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. Which models can be used with QDataWidgetMapper?

Which models can be used with QDataWidgetMapper?

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

    Hi!

    "QDataWidgetMapper":http://qt-project.org/doc/qt-4.8/qdatawidgetmapper.html can use a "QSqlTableModel":http://qt-project.org/doc/qt-4.8/qsqltablemodel.html or it has to use an abstract model?

    In the QDataWidgetMapper documentation (the See also section)there are only links to QAbstractItemModel and QAbstractItemDelegate, that's why I'm not sure it can use other models.

    Thanks!

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

      These are C++ basics. QSqlTableModel is an QAbstractItemModel. So, QDataWidgetMapper works with it, and with any other class that subclasses QAbstractItemModel.

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

        Wow, it's true, sorry. That's a I-should've-thought-about-it inheritance issue.

        Thank you for your kind answer

        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