Is there a way to know exactly when an expand operation begins when a user, lets say clicks the expand arrow in a QTreeView?
For the case when he double clicks I can catch the double-click event.
I tried reimplementing this slot void expand(const QModelIndex &index); from QTreeView but it doesn’t seem to work.
There is a signal called void expanded(const QModelIndex &index); in QTreeView but it seems to be sent after the expansion happened.
I am using QT 4.8.2
This is what I did to get the functionality I needed:
I reimplemented the mousePressEvent from QTreeView like this
I check to see if the mouse press is left to the text label of the item(meaning on the expand arrow)
This combined with the double click event gives me what I needed.