I have a right click menu containing submenus. For instance, it looks something like this
man
animal -->
cat
dog
This post here suggests to use action->associatedWidgets();
which returns list of widgets the current action is linked to.
What do i want:
I would like my menu to return animal
everytime a cat
or dog
is clicked. Additionally, that the submenu is clicked.
Is it possible to do it without iterating through list of widgets?