Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Hiding without disabling the shortcut of a QAction in one QMenu but not the other



  • Hello,

    I have a serie of QAction's. The whole serie is added in two separate menus. One of this menu is part of an always on top window. So, when the application looses focus but still sits on top of everything, shortcuts are of course non-working.

    To avoid confusion, I would like to hide the shortcuts of this serie of QAction's in this menu (dropdown of a QToolButton) but not the other.

    Do you know how to do that without having to duplicate the actions and without having to rewire all the action's signals/slots twice?

    Thanks


Log in to reply