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

System Tray Icon disappears when triggered using menu visibility signals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.4.0
    • QPA
    • None
    • OS X 10.10, Qt Creator 3.3 + Qt 5.4 recently downloaded from qt-project.org
    • macOS

      I have an app that does (simplified) the following (MyApp inherits QSystemTrayIcon):

      setContextMenu(&menu);
      connect(&contextMenu, &QMenu::aboutToShow, this, &MyApp::setActiveIcon);
      connect(&contextMenu, &QMenu::aboutToHide, this, &MyApp::setInactiveIcon);

      MyApp::setActiveIcon()

      { setIcon(activeIcon); }

      MyApp::setInactiveIcon()

      { setIcon(inactiveIcon); }

      When I click the icon the first time after starting the app, these warnings are shown twice:

      QPainter::begin: Paint device returned engine == 0, type: 3
      QPainter::setCompositionMode: Painter not active
      QPainter::end: Painter not active, aborted

      The app was working fine in Qt5.3.

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

            jturcott Jocelyn Turcotte
            xim Morten Neergaard
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes