[Qt-interest] QTree

Jaco Naude naude.jaco at gmail.com
Fri Jan 21 12:38:58 CET 2011


Well I've written some easy to use tree building classes as well as models
etc. to display it. We've been using it in quite a big project and its
stable and works very well.

I would suggest you have a look at:
http://www.qtilities.org/docs_master/page_tree_structures.html
http://www.qtilities.org/docs_master/page_observers.html
http://www.qtilities.org/docs_master/class_qtilities_1_1_core_1_1_observer_dot_graph.html

If you are interested I would suggest you get the master branch on
http://gitorious.org/qtilities since the last release is pretty outdated by
now. The master branch is stable and almost ready for the next release.

Cheers,
Jaco

On Thu, Jan 20, 2011 at 9:03 PM, Konrad Rosenbaum <konrad at silmor.de> wrote:

> On Thursday 20 January 2011, Alex Strickland wrote:
> > 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?
>
> It depends on whether your data is (half-)static or dynamic.
>
> If you can determine all elements of the tree before you display them and
> they aren't too many to fit into memory, then you can just use
> QStandardItemModel, which is a pretty good abstraction of all the trees and
> tables you can display with Qt. This also works most of the time if the
> tree
> changes only slightly and with a low update rate.
>
> If you query child elements when you click the parent or they change
> dynamically and often upon user action, you would have to write your own
> sub-class of QAbstractItemModel to interface with the real dynamic data
> source.
>
> QStandardItemModel has the upside of being very easy to use and saving you
> a
> lot of headaches, it has the downside of  duplicating your data. So you use
> it if the duplication and synchronization is less effort than adapting
> QAbstractItemModel to fit your data source or if your data source is too
> slow to work well with a GUI.
>
>
>        Konrad
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110121/5154050c/attachment.html 


More information about the Qt-interest-old mailing list