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

QSystemTrayIcon of type svg not rendering in OpenSUSE Leap 42.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.5.1
    • None
    • libX11-6 version 1.6.3-3.1, KDE 5.5.5-15.3

      I've been exploring the QSystemTrayIcon on my Linux workstation and observed that the example I copied from the tutorials was not working properly. It turns out that the issue lies with the picture format of the icons. SVG icons are not rendering in my KDE 5 system tray whilst PNG icons do render.

      It looks like this could be related to https://bugreports.qt.io/browse/QTBUG-44686 where the issue on OSX was that the SVG didn't have a native size to report. As Cedric writes:
      > I have a patch that is working fine on my Mac See : https://bugreports.qt.io/secure/attachment/46918/qt5-svgicon-systray-osx.patch
      > QIcon::availableSizes return nothing with SVG icons so we need to fix the correct size.
      > QIcon::actualSize will take the ratio of the SVG image into account and will fix the size, we just need to give it the maximum size that is QSize(maxPixmapHeight, maxPixmapHeight).

      My Version: https://github.com/richardeigenmann/QtSystray
      Original: https://doc.qt.io/archives/4.6/desktop-systray.html

        1. png.png
          png.png
          114 kB
        2. svg.png
          svg.png
          98 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            richardeigenmann Richard Eigenmann
            Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes