PDA

View Full Version : How to subclass QAbstractProxyModel


skycrestway
29th February 2008, 00:27
The documentation for QAbstractProxyModel is rather minimal. I am looking for other documentation or an example of how to subclass it.

In particular I want to create a proxy that flattens a hierarchical model. I only want to see the leaf items in a particular view.

wysota
29th February 2008, 00:49
If you want to see leaf subitems of an item, set the rootIndex of the view to the parent of the items you want to see. If you want to flatten a model, look here: http://www.thorsen-consulting.dk/freebies.html