Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8521

On Mac OS X the action icons do not appear in the context menu of System Tray - Carbon

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.6.3
    • 4.6.2
    • None
    • Carbon
    • macOS
    • b08f42e5cc0d94a3b54494f6fe0af90be858f1eb

    Description

      Having icons in the context menu of a system tray menu does not work on Carbon. The Cocoa version seems to work fine.

      #include <QtGui>
      
      int main(int argc, char **argv){
           QApplication app(argc, argv);
           QWidget dummy;
           dummy.show();
      
           QIcon icon = dummy.style()->standardIcon(QStyle::SP_DialogOpenButton);
           QSystemTrayIcon *tray = new QSystemTrayIcon(icon);
           QMenu *cmenu = new QMenu();
           QAction *action = cmenu->addAction("Please don't");
           action->setIcon(icon);
      
           tray->setContextMenu(cmenu);
           tray->show();
      
           return app.exec();
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes