PDA

View Full Version : How can i set a default value for a QSqlRelationalDelegate



graciano
20th January 2010, 22:16
Hi,

I am experimenting a piece of code based on this example: http://doc.trolltech.com/4.3/qsqlrelationaltablemodel.html#details
When i try to insert a new record and "forget" to select the "City" the insert fails because i have the FK CONSTRAINT.

Is there an easy way, without creating my own delegate, for selecting a default value from the referenced table?

Thanks

graciano
20th January 2010, 22:59
Tonight i learned a new English word ... PRIME ;)