Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [OS X]: switching off icons in the "system tray" menu
Forum Updated to NodeBB v4.3 + New Features

[OS X]: switching off icons in the "system tray" menu

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 925 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RJVB
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RJVB
      wrote on last edited by
      #2

      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)?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RJVB
        wrote on last edited by
        #3

        Bug reported: https://bugreports.qt-project.org/browse/QTBUG-41348

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved