Is it possible to sort Data from QsqlTableModel
ashokb last edited by
Is it possible to sort out and display data from QsqlTableModel as we do in actual sql query?
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?
clochydd last edited by
Hi, you should consider to use QSortFilterProxyModel