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

Windows: QSystemTray becomes visible when calling setIcon

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.2, 5.14.0 Alpha
    • 5.12.0
    • QPA: Windows
    • None
    • Windows 10
    • Windows
    • 4aa0bcf5f5266b33faf236e8c914fcf5379abf5b (qt/qtbase/5.12)

    Description

      When creating a QSystemTrayIcon object it becomes directly visible when calling setIcon() even is setVisible(false) is directly set. This not even unwanted but also a regression to at least Qt 5.9.

      This is because sendTrayMessage(NIM_ADD) is called in QWindowsSystemTrayIcon::ensureInstalled() regardless of the visible state.

       

      int main(int argc, char *argv[])
      {
         QSystemTrayIcon tray;
         tray.setIcon(QIcon::fromTheme("document-new"));
      }
      

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            elgerton Martin Elger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes