One easy solution to your issue is to use a QSortFilterProxyModel to "wrap" your model and only show the items you want visible.
>From the documentation: QSortFilterProxyModel can be used for sorting items, filtering out items, or both. The model transforms the structure of a source model by mapping the model indexes it supplies to new indexes, corresponding to different locations, for views to use. This approach allows a given source model to be restructured as far as views are concerned without requiring any transformations on the underlying data, and without duplicating the data in memory. Here is the documentation link: http://doc.trolltech.com/4.4/qsortfilterproxymodel.html#details There is a python example in examples/itemview/basicsortfiltermodel.py One word of caution, don't forget to turn the dynamicSortFilter property on! Brian
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
