Dear all,
I'm writting an application in c++ using Qt.
I have a QTreeWidget which can display base nodes inherited QTreeWidgetItem.
Each items correspond to a kernel object.
Each item have a virtual pure method to return available actions. ( add a certain type of child, edit properties of the kernel object... )
I want to enable multi selection in QTreeWidget and show a contextual Menu containing actions of each items in selection, but just one time.
for example, if my selection is :
Object0 typeA (action0, action1, ... )
Object1 typeA (action0, action1, ... )
Object2 typeA (action0, action1, ... )
I want to display available actions
(action0, action1, ... ) if I click action0 i want to trigger the action0 for Object0, Object1, Object2.
I've writen a class to factorize action using objectName. So it works but because of the kernel undo framework, In the undo stack action0 for object0 is added , action0 for object1 is added , action0 for object2 is added. ( I just want 1 action in the UndoStack ).
Is it a simple way to do that with Qt?
Thanks