Hello,
I want to write my own selection handling for my QTreeWidget. Unfortunatly the mechanism QT currently provides to do that doesn´t fit my needs. Thats why I created a class inheriting from QTreeWidget. In this class I deactivate (block!) all signals. The capture the for me necessary mouse events by overwriting mousePressEvent(QMouseEvent *event). It´s also possible to get an treeWidgetItem by using the coordinates. So far so good! But now I´m using a hierachical tree containing the collapse/expand button.
My question: How can I found out when the user clicked this button???
QTreeWidgetItem* l_TreeWidgetItem = itemAt(mapFromGlobal(QCursor:os())) and QModelIndex l_ModelIndex = indexAt(mapFromGlobal(QCursor:
os())) show me what Item/ModelIndex was clicked but this didn´t help me. Any hints I could check out!?!?!
Best regards - Skorpien126
Bookmarks