[Interest] QSqlRelationalDelegate combobox is not updated
Alex Malyushytskyy
alexmalvtk at gmail.com
Thu Apr 19 23:34:04 CEST 2012
I found a problem which looks like a bug when trying to display data
from database in
QTableView using QSqlRelationalDelegate.
Assume I have 2 tables:
-streets
-addresses
Table Addresses has column which contains reference to ID in the streets.
QSqlRelationalTableModel is used for both tables and edit strategy is
set to QSqlTableModel::OnFieldChange.
Initially table is loaded correctly, but then if record is added into
or removed from the streets
the change does not appear when viewing addresses.
In other words if combobox is opened it contains old values, even
though if table streets is displayed, all changes are there.
I verified that select() for addresses is called after appropriate
changes are made in streets at the file (with 3rd party software).
I tried to set different QSqlRelationalDelegate hoping this should
re-create the combobox, but it did not fix the problem
So I am not sure what else could be done.
Any idea is appreciated.
Regards,
Alex
More information about the Interest
mailing list