[Interest] Sorting QSortFilterProxyModel with QML

Richard Öhlinger r.oehlinger at avibit.com
Tue May 26 17:09:46 CEST 2015


You may wanna look at this:

https://blog.qt.io/blog/2014/04/16/qt-weekly-6-sorting-and-filtering-a-tableview/

You could extend it with lambdas by adding QJSValue typed property 
sortFunction and overriding filterAcceptsRow and then call 
QJSValue::call on the sortFunction.

Richard


On 05/26/2015 05:02 PM, Mark Gaiser wrote:
>
> That sounds interesting!
> Could you share that somewhere (preferably under LGPL, GPL or even BSD)?
>
> I was thinking of writing a wrapper class for that as well.
> A thing i also miss is having to ability to set filters 
> in QSortFilterProxyModel without the need to subclass it. That would 
> be possible if it takes a lambda as argument for filtering.




More information about the Interest mailing list