Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Sorting in QtableView
Qt Enthusiast last edited by
I have query in sorting a column in QtableView . One of the ways to sort a column in Qtableview
try using QSortFilterProxyModel
@ QSortFilterProxyModel *sort_filter = new QSortFilterProxyModel(this);
Now my question is is the best way to sort the column ?
Also when a sort the column does the QModelIndex of the each row changes or it remains the same
That's the official way.
You should rather write a quick test to verify the index handling. That would have answered the question faster.