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

Change style of Menu and MenuItem of 'QtQuick.Controls 1.4' on macOS



  • I would like to customise a context menu in QML on macOS, which is using the Menu and MenuItem of 'QtQuick.Controls 1.4' (Qt 5.9.6) by changing background color and text color. But I found the MenuStyle doesn't work, perhaps because it's using native menus, as mentioned in the documentation:

    Note: Styling menus may not be supported on platforms using native menus through their QPA plugin.
    

    However, I still want to customise the native macOS menus in Qt. A possible solution is to mix use of Objective-C code, but I'm not sure how exactly we could do that.

    Anyone has any ideas about this? Much appreciated!


Log in to reply