I'm trying to implement Qt Menus customization, and I'm giving a feature to add same QAction
more than once in the same RMB context menu. But when I try to do:
myMenu->addAction( myAction );
myMenu->addAction( myAction );
Adding QAction
twice, only one instance of QAction
appear on the menu.
Why can't I have more than one instances of QAction
? Is there any trick to achieve this?
I was trying to clone/create a new action with all the propeties of previous action. But I don't know the way to get/extract a QActions
's SENDER
and MEMBER
properties.
QMenuItem
class?). – nonchipQAction
here, so try to explain what you're doing. How should your menu look like, what should the different buttons do, and which of them are theQActions
you asked about? – nonchip