[Qt-interest] QSortFilterProxyModel disable sorting

Andre Somers andre at familiesomers.nl
Fri Oct 15 07:52:59 CEST 2010


  Op 14-10-2010 22:11, Andras Toth schreef:
> Hello, is there any way to disable sorting in QSortFilterProxyModel? (in order
> to use it just for filtering, but not sorting). According to the documentation
> there is a setSortingEnabled method for the view classes, but not for the
> models.
Not sure at all, but what happens if you set an invalid column to sort 
on, like -1? I can't try it out at the machine I am on right now.. 
*might* work. Otherwise Scotts subclass suggestion would work, of course.

André




More information about the Qt-interest-old mailing list