Qt 6.12 LTS is out! See what's new in the release
blog
Problem with "autosort" with QTableView and QSqlQueryModel
General and Desktop
2
Posts
2
Posters
567
Views
1
Watching
-
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