How can I make a tree like the one in the property editor sidebar of qt designer?
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!
Re: How can I make a tree like the one in the property editor sidebar of qt designer?
Quote:
Originally Posted by
bbad68
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
Re: How can I make a tree like the one in the property editor sidebar of qt designer?
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
Re: How can I make a tree like the one in the property editor sidebar of qt designer?
Re: How can I make a tree like the one in the property editor sidebar of qt designer?
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.