PDA

View Full Version : How can I make a tree like the one in the property editor sidebar of qt designer?



bbad68
26th January 2010, 20:03
Hi,

I would like to create a QTreeView or QTreeWidget similar to the one in the 'Property Editor' sidebar in the Qt Designer window: ie the names of a properties in the first column, with checkboxes or QSpinBoxes in the second. What is the best way for me to do this? I am just barely learning about model/view programming right now, so I'm not really sure where to start. Any suggestions would be greatly appreciated, thanks!

Lykurg
26th January 2010, 21:43
Any suggestions would be greatly appreciated, thanks!
Well, since the designer is open source: Get the sources and look there how the trolls did it and learn from the masters:D

AndreSilva
22nd June 2015, 18:55
Could you tell me where do I get that piece of source code. Or where I can find the source code. I want to implement the same QTreeWidget

Thanks

ChrisW67
22nd June 2015, 21:10
https://github.com/qtproject/qttools for Designer.
https://github.com/qtproject/qt-creator because Qt Creator has something similar.

d_stranz
23rd June 2015, 15:45
There is also QtPropertyBrowser: https://github.com/commontk/QtPropertyBrowser

It is hard to use, but probably easier to figure out than extracting the property widget from Qt Designer or Qt Creator.

I've looked at the Qt Designer "PropertyEditor" class in github, and it appears to have at least some dependencies on other parts of Qt Designer; it isn't a stand-alone widget.