Hi,
as far i saw the default behaviour for QTreeWidget when adding a topLevelItem is not showing the branch indicator (the item to expand or collapse the subtree) if this item has no child.
Now i want to show an indicator even if the topLevelItem has no child.
I've played around subclassing QStyle and implementing drawElement to handle the case of a PE_IndicatorBranch. The problem is that i'm not able to decide in drawElement if the item processed is a topLevelItem or a child item. I've tryed to obtain this information looking at state() and QStyle::StateFlag but i'm not able to obtain the desidered behaviour.
Can anyone help me showing me some actual code ? or a way to solve this problem ?
Thanks in advance.
Giorgio
Bookmarks