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

[regression] QSystemTrayIcon doesn't show up after (re)start of traybar



    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.4, 5.14.0 Alpha
    • 5.12.0 RC, 5.12.1
    • QPA: X11/XCB
    • None
    • Linux, i3wm
    • Linux/X11
    • 2947435d8737f9b97a80532864ec2302f6719355 (qt/qtbase/5.12)


      When calling show() on a QSystemTrayIcon while the traybar isn't available will hide the tray icon forever. The trayicon won't come up, if there's a traybar started some time later.

      Also the description of QSystemTrayIcon says, this should work:

      If the system tray is unavailable when a system tray icon is constructed, but becomes available later, QSystemTrayIcon will automatically add an entry for the application in the system tray if the icon is visible.

      It started to appear with Qt 5.12. This wasn't the case when using the Qt 5.11 versions.

      Steps to reproduce:

      • Kill your traybar (however you do it).
      • Launch an application, which uses a QSystemTrayIcon
      • Start your traybar again.
      • The app's icon won't show up.

      One workaround: Query the visible property regularly and and call on change hide() and show() in sequence. But this isn't feasible. It requires every application to change and as far as I can see, there's no event available to listen for this .


      Related issues:


        Issue Links

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



              paeglis Gatis Paeglis
              bebehei Benedikt Heine
              7 Vote for this issue
              11 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes