PDA

View Full Version : Hide qtreewidgetitem root



altVis
27th March 2008, 11:18
Hi all:)
Is it possible somehow to hide root qtreewidgetitem, but not it's children?
For instance:

root1
|
--root2
|
---child1
---child2

I want to hide root2, but child1 and child2 must stay visible.;)

wysota
27th March 2008, 11:24
With QTreeWidget it is not possible without removing root2 item from the tree. You may use QTreeView and apply a proxy on the model to hide the item and move its children upwards in the hierarchy.