Hi there,

i have a QTreeWidget with some QTreeWigetItems, wich i use as menu. I've implemented the on_treeWidget_itemClicked listener, so i can detect if i click on one of the QtreeWidgetItems inside my QTreeWidget.

But how can i detect if the selected item is selected when i click on it, so that no action will be performed. One example to this:
If i click on my item "LOAD" my custom code inside the on_treeWidget_itemClicked should only be executed if the item "LOAD" ist not selected when i click on it. When another item - let's say "SAVE" is selected and then i click on "LOAD" then my code should be executed.

This should work, too, when i populate the QtreeWidget manually and set one item to selected, so that - let's say item "DYNAMIC" if manually added at runtime and set to setSelected(true) and then i click on this entry my code should not be executed.

How can i do this?