PDA

View Full Version : Could somebody please tell me what is the name of this class?



Momergil
16th January 2014, 14:31
Hello!

I'ld like to implement a widget as the one in the print screen, but I simply can't find it in Qt Creator's implementation of Qt Designer, nor in the QtAssitant files - and I'm certain that I've seen in before as a Qt avaliable class.

9942



Thanks,

Momergil



Note: I'm using Qt 5.1, and I remember seeing this in Qt 4.8. Was it removed?

d_stranz
16th January 2014, 17:12
Well, it is probably based on QTreeView / QTreeWidget, but after 15 minutes of looking in the QtCreator source code I can't find anything that seems like a good candidate for a derived class. But then there is so much abstraction and indirection in the QtCreator source code that it is nearly impossible to discover how anything is implemented. :mad:

You might find something you can use in the QSint widgets library (http://www.qtcentre.org/threads/39822-QSint-Widgets-Library).

wysota
16th January 2014, 17:34
As far as I remember it's a standard QTreeWidget with a custom delegate.

Momergil
16th January 2014, 17:55
Well, I was looking now to Qt Creator once again and thinking how could I be mistaken about having seing that already in the Designer, when I noticed I didn't checked the QToolBox widget - and so I found it :) At least it seems to me the widget in question is far more closely related to QToolBox than QTreeWidget/View...


Well, thanks for the help (and d_stranz, for the interesting link).


Momergil

wysota
16th January 2014, 19:46
The widget is not QToolBox. It is a QTreeWidget.

https://qt.gitorious.org/qt/qttools/source/bcd22251f27bb729bda47744039e24c54e3be6d5:src/designer/src/components/widgetbox/widgetboxtreewidget.h