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. QTableView or QSqlTableModel : signal for after insert/delete/update? - SOLVED

QTableView or QSqlTableModel : signal for after insert/delete/update? - SOLVED

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 4.6k 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.
  • G Offline
    G Offline
    galrub
    wrote on last edited by
    #1

    I'm sure I'm missing something but I can only find signals for before insert/update/delete,
    is there anyway to catch the after event/signal?

    PS: need the signal to update some combo boxes outside the table.

    Thanks,
    G

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      You should check the documentation of QAbstractItemModel. It has a whole list of signals that I think would be of use to you.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jim_kaiser
        wrote on last edited by
        #3

        Ah.. ofcourse.. why you don't see the signal's you want is because.. you need to take a look at the base class (QAbstractItemModel) where we have a lot more signals (row/column added/moved/removed/ etc...) This is always the case. In most classes, a lot of important functions/signals would be in the abstract base class.

        See "documentation":http://doc.qt.nokia.com/latest/qabstractitemmodel.html#signals

        1 Reply Last reply
        0
        • G Offline
          G Offline
          galrub
          wrote on last edited by
          #4

          Thx,
          ok, there are signals for remove and insert but no signal for update,

          any idea?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            There is: QAbstractItemModel::dataChanged

            1 Reply Last reply
            0
            • G Offline
              G Offline
              galrub
              wrote on last edited by
              #6

              alright'y then, thanks :-)

              funny, there is no way to change this to 'Solved'... so:

              SOLVED!

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                [quote author="Mr.G" date="1308043161"]alright'y then, thanks :-)

                funny, there is no way to change this to 'Solved'... so:

                SOLVED![/quote]

                Actually: there is :-)
                You can edit your first post, and simply modify the title (adding a [Solved] to it will do)

                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