[Interest] QSortFilterProxyModel and Exceptions

william.crocker at analog.com william.crocker at analog.com
Tue Nov 14 12:05:17 CET 2017


On 11/14/2017 05:46 AM, Nuno Santos wrote:
> Hi,
>
> I’m using QSortFilterProxyModel to sort a data model ascending and descending.
>
> I wanted to create an exception to make a single item always appear at the beginning of the filtered model, bypassing the sort.
>
> Does anyone knows if this is possible?
>

Build that special case into your lessThan() function.

> Thx!
>
> Regards,
>
> Nuno
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>




More information about the Interest mailing list