Hello all,
Is it possible to draw frames around each tree widget items? I could not find any way to handle this
Thanks in advance for your help...
Hello all,
Is it possible to draw frames around each tree widget items? I could not find any way to handle this
Thanks in advance for your help...
Last edited by fulbay; 29th December 2010 at 14:25.
Frames as in ? rect on the boudary ?
Sure... use delegates. Have a look at QItemDelegateand QStyledItemDelegate
Borders between each tree widget item in a tree widget (QTreeWidget).
Which widget should I delegate? It is not very clear to me. I have used delegated items just to put another type of widget on a column in the tree. How should I use this kind of implementation to make frames around the tree widget items?
Thanks a lot...
You just need to override the paint function of delegate.
Call the base class paint function, and after that draw the rect as a boundary,
fulbay (29th December 2010)
Bookmarks