PDA

View Full Version : QTreeWidget curious expanding bug



thomas@itest
4th March 2013, 16:05
Hi all,

I've got a quite huge treewidget (subclassed) with always one unique root.

When all children of this root are collapsed, I can't expand them any more using the expand button. I still can expand them with the keyboard (keys as '+', '->' or '*') but the expand button stays static. (On windows 7, the button should get a blue color on mouse hover but it remains black ...)

I can't give an example code but :

I've got a SLOT wich receives the itemClicked signal wich is used to auto select other items in the tree
I've got a SLOT wich receives the itemSelectionChanged signal to update a toolbar
And two slots connected to the signals itemExpanded/collapsed to add/remove thread tasks but which do not change anything in the tree state.

When everything is working (when at least one child of the root is expanded), I receive the itemExpanded/Collapsed signals accordingly when I expand/collapse an item but when the bug occurs, I receive the itemClicked signal.

Does anyone have an idea on what I'm doing wrong ? I'm totally lost (especially on the fact that the expand button stays black and is not animated anymore).

I don't reimplement any paint event.

Thanks in advance !

wysota
4th March 2013, 16:08
Please provide a minimal compilable example reproducing the problem.