Unsolved QTableView::sortByColumn is obsolete
-
The documentation @ http://doc.qt.io/qt-5/qtableview-obsolete.html indicates that the function QTableView::sortByColumn is obsolete. Does someone know the alternate advised method to reach that same functionnality?
-
view->model()->sort(/**/);
http://doc.qt.io/qt-5/qabstractitemmodel.html#sort -
Merci, merci... in the mean time I also found out that using a QSortFilterProxyModel is working as well.
-
@VRonin
There is presumably a reason for the obsolescence. Why has this been deprecated? -
It was marked as obsolete a long time (>10 years) ago, before the time of gerrit, even before Qt5. Difficult to dig out the exact reason but I imagine it'd because this operation acts on the model so it could be misleading to call it from the view directly