[Qt-qml] QSortFilterProxyModel and QML ListView
Stephen Kelly
steveire at gmail.com
Wed Dec 22 23:55:02 CET 2010
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.
More information about the Qt-qml
mailing list