PDA

View Full Version : QTreeView expand and collapse



Qiieha
9th October 2012, 09:34
Hi I have a little problem with QTreeView and expand collapse behaviour.

If I collapse a parent the childs of the parent dont't get collapsed. Is there a way to achieve that all childs are collapsed if their parent get collapsed, without implementing a collapsed_slot in
the QTreeView?

thanks

Santosh Reddy
9th October 2012, 12:24
Do you mean children are visible event afer parent is collapsed?
or
Do you mean children are still expanded, after parent is collapsed and expanded back?

Qiieha
9th October 2012, 12:38
:) thank you for your reply santosh!

the second one...

Santosh Reddy
9th October 2012, 12:43
I am afraid you have to implement either a slot, or a custom QTreeView class, and do recurssive collapse on all the children and sub-children ....

Qiieha
9th October 2012, 12:57
Ok, thank you.
I expected that.