PDA

View Full Version : Property Window in QtDesigner



wirasto
21st January 2010, 08:24
How to make treeview like Property Window in QtDesigner ? That is like one treeview with 4 root ? Every root (QObject, QWidget, QDialog, Layout) have a color different.

aamer4yu
21st January 2010, 08:54
That is normal QTreeView with delegates.
Have a look at QStyledItemDelegate and QItemDelegate.

wirasto
21st January 2010, 13:24
Ok, thanks for your reply.

But actually I have no idea how to reimplement paint for my Delegate, oh yes I try use QStyledItemDelegate.
I want replace alternate row color in treeview with yellow and make a border-bottom for every row. I have make this with stylesheet and success. But with stylesheet I can't use QBackgroundRole in my model anymore.