Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[OS X]: switching off icons in the "system tray" menu
On OS X, Qt 4.8.6 appears not to respect the
IconVisibleInMenuQAction setting for members of a "System Tray" menu.
This is easily shown with the systray example: change Window::createActions to
minimizeAction = new QAction(tr("Mi&nimize"), this);
qDebug() << "createActions" << minimizeAction << "icon=" << minimizeAction->icon() << "visible=" << minimizeAction->isIconVisibleInMenu();
connect(minimizeAction, SIGNAL(triggered()), this, SLOT(hide()));
and the console output will read
createActions QAction(0x115355cd0) icon= QVariant(QIcon, ) visible= false
but the minimise menu item will still have an icon.
Is this a known issue in Qt4, with a known workaround? Where in the Qt4 code could I look to fix this, if a patch doesn't exist already?
Also, when playing with the Qt5 systray example, I noticed that this 5.3 does respect the icon visibility when adding an action, but I can't seem to get the visibility to change dynamically (while changing the icon image works just fine)?
Bug reported: https://bugreports.qt-project.org/browse/QTBUG-41348