[Qt-qml] QSortFilterProxyModel and QML ListView

Stephen Kelly steveire at gmail.com
Wed Dec 29 13:10:59 CET 2010


Chris wrote:

> If you enable dynamic sorting:
> QSortFilterProxyModel::setDynamicSortFilter(true)
> 
> then you only need to call sort() once (for example in the constructor) so
> that the model knows which way to sort.
> Then any time the model changes, the sorting will be automatically
> updated.
> 
> I personally use QSortFilterModel with QML and it works just fine.
> 

Indeed. There's a chance you'll hit funny bugs if you're using qt4.7.0 or 
4.7.1, but it will work.



More information about the Qt-qml mailing list