I have currently design an interface using TreeWidgetItems.
I have connected some actions depending on what i want to do. such as below
connect(this, SIGNAL(itemClicked(QTreeWidgetItem*, int)),
this, SLOT(onSubTreeDisplay(QTreeWidgetItem*)));
connect(this, SIGNAL(itemExpanded(QTreeWidgetItem*, int)),
this, SLOT(onSubTreeDisplay(QTreeWidgetItem*)));
the itemClicked is working fine but I'm not able to catch event when I'm expanding a item.
itemClicked is generated as soon as we click but itemExpanded seems only reacting when we expand the specified item.
I need to generate this signal as soon as I'm trying to expand without need to specify the item. What I'm looking for is something like itemClicked which give you which item has been clicked. when accessing to Interface, and expand the item, I want to generate the signal and get the item which has been expanded.
Any idea to avoid the "This signal is emitted when the specified item is expanded so that all of its children are displayed." and have "This signal is emitted when the any item is expanded so that all of its children are displayed."