Important: Please read the Qt Code of Conduct -

[SOLVED] OSX menu icons

  • I try to hide the menu icons on a OSX build.

    From the documentation (5.2) I tried:

    void qt_mac_set_menubar_icons(bool enable);

    But getting this link error:

    Undefined symbols for architecture x86_64:
    "qt_mac_set_menubar_icons(bool)", referenced from: _main in main.o

    grepping in the Qt installation dir only finds "qt_mac_set_menubar_icons" only in the documentation, not in the libs.

    Am I missing something?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    It's probably a documentation error. These kind of platform specific code has been moved to their respective extras repository (in your case qmacextras) but it seems that it has not yet been ported to Qt 5.

  • Lifetime Qt Champion

    Looking a bit further you can use this:

    @QApplication::instance()->setAttribute(Qt::AA_DontShowIconsInMenus, true);@

  • Thanks for your answers, I wil try this.

    [quote author="SGaist" date="1391382688"]Looking a bit further you can use this:

    @QApplication::instance()->setAttribute(Qt::AA_DontShowIconsInMenus, true);@[/quote]


Log in to reply