Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Invisible QSystemTrayIcon [SOLVED]
Qt 6.11 is out! See what's new in the release blog

Invisible QSystemTrayIcon [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 2.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dani
    wrote on last edited by Dani
    #1

    Hello.
    I have used QSystemTrayIcon in my application. OS: Windows 7. It worked perfectly, but when I launched this application in Windows XP icon in tray was invisible, but menu in tray worked.
    How to solve this problem?

    Here is code:
    QSystemTrayIcon* trayIcon;
    ...
    trayIcon = new QSystemTrayIcon(this);
    trayIcon->setToolTip("Tool");
    trayIcon->setIcon(QIcon(":/pictures/icon.ico"));
    trayIcon->show();

    1 Reply Last reply
    0
    • mrdebugM Offline
      mrdebugM Offline
      mrdebug
      wrote on last edited by
      #2

      Please, try to change the icon resolution.

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      D 1 Reply Last reply
      0
      • mrdebugM mrdebug

        Please, try to change the icon resolution.

        D Offline
        D Offline
        Dani
        wrote on last edited by Dani
        #3

        @mrdebug It's not work. I've tried resolutions 16x16, 32x32, 64x64 and multi-resolution icon (16, 32, 48, 64, 128, 256) but result is the same: on Windows 7 proper icon, on Windows XP - no icon.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Dani
          wrote on last edited by
          #4

          Still actual.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            If you use this icon on e.g. a QLabel, is it visible on XP ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply
            0
            • SGaistS SGaist

              Hi,

              If you use this icon on e.g. a QLabel, is it visible on XP ?

              D Offline
              D Offline
              Dani
              wrote on last edited by
              #6

              @SGaist Hello.
              QLabel with it is invisible on XP. I also set this icon on exe file (I mean this IDI_ICON1 ICON DISCARDABLE "icon.ico") and it works: exe contains this icon.

              R 1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Did you deploy all dependencies correctly on XP ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • D Dani

                  @SGaist Hello.
                  QLabel with it is invisible on XP. I also set this icon on exe file (I mean this IDI_ICON1 ICON DISCARDABLE "icon.ico") and it works: exe contains this icon.

                  R Offline
                  R Offline
                  raf924
                  wrote on last edited by
                  #8

                  @Dani Try in another format

                  1 Reply Last reply
                  1
                  • D Offline
                    D Offline
                    Dani
                    wrote on last edited by
                    #9

                    I converted that *.ico file to *.png format and it works now!
                    Thanks everybody.

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved