[Qt-interest] QAbstractProxyModel methods index, parent, rowCount, columnCount not implemented?

Andre Somers andre at familiesomers.nl
Wed May 18 08:38:21 CEST 2011


Op 18-5-2011 5:10, Ross Bencina schreef:
>
> I'm not subclassing QSortFilterProxy because my proxy doesn't change the
> item layout. I just need to decorate some items by changing flags and
> secondary data based on item values.
I would like to advise you that you _do_ subclass QSortFilterProxyModel 
instead. It is much easier to work with, even if you don't want sorting 
or filtering. There are no methods to reimplement that are only 
concerned with book keeping.
Some examples of what you want to do:
http://developer.qt.nokia.com/wiki/QSortFilterProxyModel_subclass_to_add_a_checkbox
http://developer.qt.nokia.com/forums/viewthread/4788

André




More information about the Qt-interest-old mailing list