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

QSystemTrayIcon no icon Wayland/StatusNotifierItem on Labwc(compositor)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 6.6.2
    • None
    • Linux/Wayland

    Description

      QSystemTrayIcon doesn't display icons when using Wayland and a tray implementing StatusNotifierItem.

      Message being shown:

      QSystemTrayIcon::setVisible: No Icon set.

      What is weird is that some icons are being shown. I have verified that the icon theme contains the requested icons. Here's an excerpt from the dbus log:

      Working icon:

            dict entry(
               string "IconName"
               variant             string "video-display"
            )
      

      Not working icon:

      dict entry(
               string "IconName"
               variant             string ""
            )

      The string is empty for some reason. Why isn't it getting the proper icon passed?

      I am experiencing this with a Python program and using PyQt6. The Wayland compositor I'm using is Labwc and the tray is implemented by Waybar, but I have tested it with other trays implementing the SNI protocol and they have the same issue.

      I have attached a test program and the complete dbus message log of a working icon and a missing icon. The icon theme which I tested it with is the Adwaita icon theme. The icon which works is "video-display". An icon which doesn't work for example would be "audio-volume-high".

      Attachments

        1. dbus-log-broken.txt
          25 kB
        2. dbus-log-working.txt
          26 kB
        3. test.py
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            lik.doyaya Lik Doyaya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes