Qt 6.11 is out! See what's new in the release
blog
QtSql.RelationalTableModel weird behavior
General and Desktop
1
Posts
1
Posters
438
Views
1
Watching
-
Hi Everyone,
I am using QtSql.RelationalTableModel and I have setRelation defined. setRelation just seems to act really really weird. If I add a new row and then click the cell that the relation is based on up comes a combobox. I select the value and then I click on a different cell. The value that is returned is the id value. When I go to hit enter to add the row it does not get added. Do I need to do anything in the delegate to get this to work?
Also why when I do self.model.insertRow(row) does it not automatically add the row to the database? It is only after I fill in the information that the row id gets added.
I am sure that it is user error, but has anyone else come across this?
Thank you,
Luke