QDataWidgetMapper question
Has anyone played with the QDataWidgetMapper in releation with a QSqlRelationalTableModel. In other words having an input mask for various table fields as well as showing the full table. When I insert a new record into the table it looks like the mapper is not submitting the data correct when using
Thanks.
Re: QDataWidgetMapper question
Exactly in what way does it not work correctly? I know it's a lot asked but could you prepare a minimal compilable example (which eg. creates a sqlite test db in memory) reproducing the problem so we could give it a try?
1 Attachment(s)
Re: QDataWidgetMapper question
Hi,
I attached the modified Qt books demo and you see the problem. Insert a new row and try to fill the fields. I also found the problem while I prepared that example. When you use
instead of
you will notice that the when the fields get changed the are not changed in the table. Can someone explain to me the different behavior?
Thanks in advance.
1 Attachment(s)
Re: QDataWidgetMapper question
Another strange thing is when you use a mysql database and delete all rows (I added an delete button to the code example) you will have an empty row in the table left - QSQLITE will not show this problem.
And one last thing I noticed if you insert a row but do not submit (the table will show *) the mapper works not correct (values will not be shown in the table)
So, three open questions. I appricate any help.
Many thanks