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. Implementing QAbstractTableModel
QtWS25 Last Chance

Implementing QAbstractTableModel

Scheduled Pinned Locked Moved General and Desktop
23 Posts 4 Posters 13.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.
  • G Offline
    G Offline
    giesbert
    wrote on last edited by
    #21

    [quote author="Andre" date="1318239693"]Indeed, it is pure virtual (normal virtual methods would work, of course). I guess this was just a matter of habbit from Gerolf to call base implementations as the default case; and a good habbit that is too! :-)[/quote]

    aeh, yep, I did not test it otherwise I would have seen that :-) sorry.
    a return of an empty variant should be it.

    Nokia Certified Qt Specialist.
    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

    1 Reply Last reply
    0
    • P Offline
      P Offline
      portoist
      wrote on last edited by
      #22

      Well, it still doesn't solve my problem :-) How can I tell to the view that data are invalid? When I am using just simple List, I just call beginInsertRows and endInsertRows. It works ok and data method is requested for row 0,1,2.
      I have tried calling beginResetModel each time before values are set but all it does is that it calls data method once with index of column 0 and row 0.
      I gues I will have to use just simple list of QString and return whole rows in data method...

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #23

        In genereal, it works with beginResetModel / endResetModel if you change the whole model.
        If you update a value, use dataChanged signal.
        If you only insert a row or a column, use beginInsertRows() and endInsertRows, resp. Columns.

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        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