[PyQt] Nullable foreign keys

Catriona Johnson catriona.johnson at gmail.com
Fri Mar 28 00:15:05 GMT 2008


I have a QSqlRelationalTableModel which is viewed using a QTableView
and QSqlRelationalDelegate to give comboboxes for foreign key fields.

My question is how do I handle nullable foreign keys? If foreign key
is null it is not being displayed in the QTableView and there seems to
be no way of having a null value in a combo box apart from having a
'Null' record which I don't really want to do.

Thanks in advance

More information about the PyQt mailing list