Which models can be used with QDataWidgetMapper?
-
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!
-
These are C++ basics. QSqlTableModel is an QAbstractItemModel. So, QDataWidgetMapper works with it, and with any other class that subclasses QAbstractItemModel.
-
Wow, it's true, sorry. That's a I-should've-thought-about-it inheritance issue.
Thank you for your kind answer