[Qt-interest] QLineEdit QDataWidgetMapper SQL NULL

Linos info at linos.es
Thu Feb 12 19:01:44 CET 2009


Hello,
	i am using QDataWidgetMapper with a QSqlRelationalModel, the problem i have 
exactly it is that i am using QLineEdit with a column (alternative barcode for 
items), that usually is null but when it is set is UNIQUE, the standard behavior 
of QDataWidgetMapper for empty QLineEdit is to set the column on the model with 
an empty QString, so i load a item without alternative barcode (NULL value) and 
without make any change call submit in the widgetmapper and i get a empty string 
in the column and after edit a second item i have a unique error from 
Postgresql. What would be the better way to change this? Thanks.

Regards,
Miguel Angel.



More information about the Qt-interest-old mailing list