QSqlRelationalTableModel/QDataWidgetMapper and empty fields

Alles rund um die Programmierung mit Qt
Antworten
cotecmania
Beiträge: 2
Registriert: 12. Dezember 2011 15:31

QSqlRelationalTableModel/QDataWidgetMapper and empty fields

Beitrag von cotecmania »

Hello together,

I have a working model and mapper and the values are shown in several widgets.
If i set a filter to my modell which leads to zero data in the model, my widgets are not cleared. They keep their values from before setting the filter.
The same occurs when i have empty fields in a record.
This problem occurs only on fields which are not strings like numbers or dates.
My DB is an Access.mdb and is connected via QODBC.

Once again :
Textfields are cleared if they are empty, the others keep their values from the record before !

How can i solve this ?

Thanks in Advance
Antworten