[OS X]: switching off icons in the "system tray" menu
-
On OS X, Qt 4.8.6 appears not to respect the
IconVisibleInMenu
QAction setting for members of a "System Tray" menu.This is easily shown with the systray example: change Window::createActions to
@
void Window::createActions()
{
minimizeAction = new QAction(tr("Mi&nimize"), this);
minimizeAction->setIconVisibleInMenu(false);
minimizeAction->setIcon(QIcon(":/images/bad.svg"));
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?
-
Bug reported: https://bugreports.qt-project.org/browse/QTBUG-41348