Solved Can I turn sorting on or off in QSortFilterProxyModel?
Can I turn sorting on or off in QSortFilterProxyModel?
I want to sort the first second column when it is clicked, and sort off when the column is pressed.
JonB last edited by
There are several possible ways to achieve this. If you have derived your own class, your can override http://doc.qt.io/qt-5/qsortfilterproxymodel.html#sort to decide to do nothing if the
columnis not one you want to sort on. Or, you could do the work at the view side instead of in the model if you prefer.