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 showMessage icon stays permanently (Ubuntu 18.04)
Forum Updated to NodeBB v4.3 + New Features

QSystemTrayIcon showMessage icon stays permanently (Ubuntu 18.04)

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 748 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.
  • P Offline
    P Offline
    Pete_a_saurus
    wrote on last edited by
    #1

    In my program , I am trying to change the system tray icon to something else (tempIcon) for 5 seconds using the following code:

    systemTrayIcon->showMessage(tr("title"), QString::fromStdString(msg), tempIcon, 5000);
    

    but the icon does not change back to the original icon ever.

    Am I doing something wrong here? Or is this a framwork problem in Qt?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Pete_a_saurus
      wrote on last edited by
      #3

      Fixed the issue by creating another QSystemTrayIcon to show messages, and used systemTrayIcon->setIcon() method to change icon.

      1 Reply Last reply
      1
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #2

        With this function, you are displaying a message, not changing the tray icon... however, the message icons tend not to work more often than they do.

        (Z(:^

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Pete_a_saurus
          wrote on last edited by
          #3

          Fixed the issue by creating another QSystemTrayIcon to show messages, and used systemTrayIcon->setIcon() method to change icon.

          1 Reply Last reply
          1

          • Login

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