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. QSystemTrayIcon does not appear
Qt 6.11 is out! See what's new in the release blog

QSystemTrayIcon does not appear

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.1k Views 1 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.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    QSystemTrayIcon does not appear

    This code

    @ QSTITrayIcon= new QSystemTrayIcon(this);
    QSTITrayIcon->setToolTip(this->windowTitle());
    QSTITrayIcon->setIcon(this->windowIcon());
    QSTITrayIcon->setContextMenu(QMTrayIcon);
    QSTITrayIcon->show();
    @

    works correctly with Qt 4.8.4 but not with Qt5. The TrayIcon does not appear in the task bar but in the top left corner of my desktop (Debian 7 with Kde). Have you got any idea?

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

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

      Hi,

      Are you sure windowIcon() returns something valid ?

      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
      • mrdebugM Offline
        mrdebugM Offline
        mrdebug
        wrote on last edited by
        #3

        I think yes. I have tried to change the icon without a good result.
        Look at the attached screenshot, you will see the icon in the top left corner.
        !http://www.denisgottardello.it/QSystemTrayIcon.png(QSystemTrayIcon)!

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

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

          Have you found the solution? Have you open a bug report?

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

          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