Hello, 
I'm wondering how I could go about implementing a view of a C++ based tree such 
that the entire tree is shown. I've seen plenty where you can navigate the tree 
showing sections of it, but i want to see the WHOLE tree. 
The complication is that I have a data structure in C++ land, and everything in 
the tree is an abstract "TreeNode" but there are 5 or 6 specialisations of 
TreeNode that represent different things. The tree is not a part of any of the 
Qt model frameworks (e.g. AbstractItemModel etc). Can QML handle recursive tree 
structures like that yet (each TreeNode has a list of child TreeNode's)? Is 
there some magical way to say "here is my tree of TreeNodes" and QML then knows 
how to layout and draw each concrete instance (e.g. TextTreeNode, ImageTreeNode 
etc)?
Can anyone point me in the right direction? I don't actually intend on drawing 
my tree like a QTreeView, it actually represents a document, but I am stuck on 
the first step of getting a C++ tree structure mapped to something in QML.
Any pointers you could provide would be of great help. 
Thanks,Simon                                      
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to