Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved]QTableView and SQlite, after query update unwanted new row
QtWS25 Last Chance

[solved]QTableView and SQlite, after query update unwanted new row

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.0k Views
  • 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.
  • I Offline
    I Offline
    ihtzudismqa
    wrote on last edited by
    #1

    Hello,
    like mentioned above I have a problem with QTableView. First I'll describe the conditions:
    I have a QTableView with QSqlRelationalTableModel. I created one Dialog, to edit contents easier. Here is the problem:
    When I open the Dialog, make changes etc. I can successfully update the values in the database, but a new row is added.
    How can I fix this?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      ihtzudismqa
      wrote on last edited by
      #2

      Edit: I could fix it!

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DenisKormalev
        wrote on last edited by
        #3

        If you've found the solution by your own please post it here

        1 Reply Last reply
        0
        • I Offline
          I Offline
          ihtzudismqa
          wrote on last edited by
          #4

          The problem was that I overlooked, that there was an insert statement, just removed and it worked.

          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 Extensions
          • Unsolved