[Qt-interest] QTree

Andre Somers andre at familiesomers.nl
Thu Jan 20 15:10:03 CET 2011


Op Do, 20 januari, 2011 3:00 pm, schreef Sean Harmer:
> On Thursday 20 January 2011 13:55:32 Alex Strickland wrote:
>> Hi
>>
>> I am just starting out to learn about Model/View via the Simple Tree
>> Model example. The tree used in the example looks functional, but it
>> lead me to look for a QTree (or similar) class but I couldn't find
>> anything. Is there such a thing?
>
> No. Feel free to write one though as it would be a useful addition :D

I usually rely on this one:
http://tree.phi-sci.com/

Works just fine. I even wrote a generic QAbstractItemModel subclass that
you can inherit from to make using tree.hh based trees easy with the
item/view framework. You only need to reimplement data() (and flags() if
you want) and be done.

There are alternatives though, like Adobe's Forest:
http://stlab.adobe.com/group__asl__tutorials__forest.html

André





More information about the Qt-interest-old mailing list