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 minimized issues on Ubuntu
Forum Updated to NodeBB v4.3 + New Features

QSystemTrayIcon minimized issues on Ubuntu

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 319 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.
  • A Offline
    A Offline
    anshah
    wrote on last edited by anshah
    #1

    I have a Qt GUI application with a QMainWindow that displays and minimizes when clicking on the QSystemTrayIcon on the top status bar. When the QMainWindow is minimized there is a dashboard icon that is available on the Ubuntu dashboard which is located on the left side of the screen by default.

    The main issue is that once the QMainWindow is minimized to the dashboard the only way to get it to display again is to click on the dashboard icon, which is fine, but the QSystemTrayIcon becomes unresponsive when the QMainWindow is minimized. I want to be able to click on the dashboard icon or system tray icon to get the UI back.

    I've tried everything including trying to capture mouse click events but the challenge is the QSystemTrayIcon is derived from a QObject not a QWidget so it cannot capture mouse click events.

    Any help would be most appreciated?

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

      Hi,

      Isn't the activated signal what you are looking for ?

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

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Isn't the activated signal what you are looking for ?

        A Offline
        A Offline
        anshah
        wrote on last edited by
        #3

        @SGaist The activated signal does not trigger when the QMainWindow is minimized. That is why I was looking for a workaround using QMouseEvents. Since QSystemTrayIcon is a QObject it can't handle mouse events.

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

          Does this happen with your distribution provided Qt or with a custom installation ?

          AFAIK, activated should not be dependent on the state of your main window.

          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

          • Login

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