Is it possible to sort Data from QsqlTableModel
-
wrote on 15 Apr 2014, 11:21 last edited by
Hi,
Is it possible to sort out and display data from QsqlTableModel as we do in actual sql query?
Something like,
SELECT DISTINCT modelName FROM joint_insp.modelinfo;
So i want only model names from QsqlTableModel and display them.
I want whole table in that QsqlTableModel so i can't do this,
@model.setQuery("SELECT DISTINCT modelName FROM joint_insp.modelinfo");@because then there will be only modelNames in my QsqlTableModel. Write?
So, is it possible or should i make specific query every time to database? -
wrote on 15 Apr 2014, 11:41 last edited by
Hi, you should consider to use QSortFilterProxyModel
1/2