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. Which message clicked for QSystemTrayIcon
Forum Updated to NodeBB v4.3 + New Features

Which message clicked for QSystemTrayIcon

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

    Is there any way of figuring out which message was clicked when I get the messageClicked signal from my QSysTrayIcon? If my app puts up a couple in a row, I would like to know which one was clicked on when that signal fires.

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      what do you mean with "my app puts up a couple in a row"? A couple of QSystemTrayIcons?
      If so each QSystemTrayIcon object emits the signal. Thus you can do the mapping.
      You could use QSignalMapper in that case for example.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jdarnold
        wrote on last edited by
        #3

        No, it calls the tray icon's ShowMessage twice in a row. And it is connected to the messageClicked, but I'd like to know which of the two systray messages was clicked on.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jdarnold
          wrote on last edited by
          #4

          Ah, never mind. I was misinformed - at least on Windows, you can't have more than one message showing via the showMessage method. The later one just replaces any one that is currently showing.

          That's what I get for asking about a reported bug before actually trying to recreate it...

          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