Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtSql.RelationalTableModel weird behavior
Qt 6.11 is out! See what's new in the release blog

QtSql.RelationalTableModel weird behavior

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 438 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt
    • Unsolved