macosqtmenudockqaction

How to add QAction menu items to dock icon


How do you insert a custom QAction as a menu item, not in the menubar, but in the dock icon on Mac?


Solution

  • Used

    void qt_mac_set_dock_menu(QMenu *menu);
    

    which has to be declared first:

    extern void qt_mac_set_dock_menu(QMenu *);