View Full Version : QTreeWidget: Animation when expanding between double-click and 'expand sign' press

7th June 2013, 17:45
Hello everyone;

The question I have is about the animation during the "expanding" and "collapsing" of a node in a QTreeWidget.

With the property "expandsOnDoubleClick" and "animated" are setted to true, I experience different behaviors between the 2 available ways for expanding a node:
- When clicking on the expand sign (on the left of the node), a smooth expanding animation occurs
- When double-clicking on a node, a real fast expanding (almost without animation) occurs

I tried to dynamically expand a node, using the following slots, without success (the animation is still un-smooth)

void QTreeWidget::expandItem ( const QTreeWidgetItem * item )
void QTreeView::expand ( const QModelIndex & index )

I'm trying to find the methods called when the 'expand sign' is pressed, but nothing so far...
And , maybe I'm not looking in the correct direction...

I thank you i advance for reading and trying to help me solve this question.


Technical information:
I tried this in Debug and Release configuration.
QT 4.8
Windows 7