Problem with "autosort" with QTableView and QSqlQueryModel
Hi, I have a problem with QTableView and QSqlQueryModel. When I use setQuery method and with sql statement "Select ... Order by columnX DESC", I see in view my select always ascending. Can I turn off this "autosort" in QTableView or QSqlQueryModel?
Hi and welcome to devnet,
Looks like you're searching for "setSort":http://doc.qt.io/qt-5/qsqltablemodel.html#setSort