[Qt-interest] Displaying NULL values using QDataWidgetMapper

Andre Somers andre at familiesomers.nl
Fri Jan 22 09:18:56 CET 2010


saikari keitele wrote:
> Hello,
>
> I'm using a QDataWidgetMapper to display and edit the fields of a 
> database table.
> I have mapped a lineEdit to an integer column in the table. When this 
> column has a null value in the database, it is displayed with the 
> value 0 in the lineEdit. However I would like it to be displayed as 
> the empty string so that the lineEdit appears blank when the value is 
> NULL. What is the simplest way of doing this?
> Thank you very much for any help,
>
>
> saikari keitele
Did you search the list before asking this question?
This very topic was discussed in two threads started by Bar Tomas. One 
started on the 19th, the other one on the 20th. of this month.

André




More information about the Qt-interest-old mailing list