[Qt-qml] QSortFilterProxyModel and QML ListView

Bartosh Wroblevksy bartosh at live.com
Wed Dec 29 05:40:58 CET 2010


With QSortFilterProxyModel, it looks like I have to take care of the list being sorted myself by calling QSortFilterProxyModel::sort(), please tell me there is a better way.

From: bartosh at live.com
To: steveire at gmail.com; qt-qml at trolltech.com
Date: Tue, 28 Dec 2010 23:31:58 -0500
Subject: Re: [Qt-qml] QSortFilterProxyModel and QML ListView








so why is my list not appearing sorted????? I was afraid of this. 

> To: qt-qml at trolltech.com
> From: steveire at gmail.com
> Date: Wed, 22 Dec 2010 23:55:02 +0100
> Subject: Re: [Qt-qml] QSortFilterProxyModel and QML ListView
> 
> Bartosh Wroblevksy wrote:
> 
> > 
> > Hi,
> > I am about to use a QSortFilterProxy model with a QML ListView. I do not
> > want to end up with nasty surprises. Do QML listViews support Qt's
> > QSortFilterProxy?
> 
> Yes. QML uses the QAbstractItemModel API. QML doesn't know or care that it's 
> a proxy. Any custom roles set with setRoleNames on your 'core' model are 
> also available through the proxy.
> 
> > When items are filtered, can I set animations when they
> > disappear? Thanks, Bartosh
> 
> Yes. You can use onAdd and onRemove as before I guess. I don't think I've 
> tried using them with a QAIM before though.
> 
> Steve.
> 
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
 		 	   		  

_______________________________________________
Qt-qml mailing list
Qt-qml at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101228/07cc891f/attachment-0001.html 


More information about the Qt-qml mailing list