QSqlTableModel setFilter() method re-selects from database
-
Is there a way to filter an SqlTableModel without re-selecting from the database?
Is there a way to filter the QTableView instead, and leave the underlying model alone?
-
I found this to work well for doing that: http://qt-project.org/doc/qt-5.0/qtcore/qsortfilterproxymodel.html
and this example is what I used to get it going: http://qt-project.org/doc/qt-5.0/qtwidgets/itemviews-customsortfiltermodel.html
-
That's exactly what I needed.