PDA

View Full Version : paint QTreeView item !!



mcenatie
19th March 2006, 10:23
I create a QTreeView and I set my custom model and my custom delegate. In my delegate I redefine the paint method to paint the items of the QTreeView like I want. The issue is that the branches are not paint (I have attached a picture of the QTreeView).
So how can I do to paint the item and the branch using my delegate ? I'd like to avoid to subclass QTreeView and redefine the drawBranches method ....
Thanks for your help!

wysota
19th March 2006, 11:12
The delegate is not responsible dor painting branches. You can enable or disable branches painting by tweaking the tree view or by changing the QStyle of the application.

jpn
19th March 2006, 14:24
This thread (http://www.qtcentre.org/forum/showthread.php?t=1095) might be worth checking out..