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. Qt Frameless Transparent Window in System Tray for Ubuntu 19.04
Forum Updated to NodeBB v4.3 + New Features

Qt Frameless Transparent Window in System Tray for Ubuntu 19.04

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 428 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'm using Ubuntu 19.04 and I have been dealing with figuring out a workaround for the following issue regarding QSystemTrayIcon not responding to mouse clicks by emitting any signals. What makes this more difficult is that QSystemTrayIcon is not a QWidget so it can't capture mouse events.

    https://forum.qt.io/topic/108053/qsystemtrayicon-signals-not-emitting-on-mouse-click-in-ubuntu-19-04/14

    My workaround is to create a small transparent, frameless QWidget window that fits over the QSystemTrayIcon that will accept and process the mouse clicks. My question is that is it even possible to have access to Ubuntu System Tray in the screen geometry corrdinates. I think it cuts off at zero before the System Tray begins.

    The QSystemTRayIcon geometry doesn't work as it returns all zeros:

    QRect rect = trayIcon->geometry();
    qDebug() << "Tray GEO: " << rect;
    

    This returns:

    Tray GEO:  QRect(0,0 0x0)
    

    Any ideas about the how I can go about implementing this?

    1 Reply Last reply
    0
    • A anshah

      @SGaist I'm using Qt 5.12.2 which is included in the apt-get repo for Ubuntu 19.04.

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

      @anshah I figured it out guys. I had to install Top Icons Redux and adjusted some settings using the Gnome Tweak Tool. Everything is working fine now.

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

        Hi,

        What version of Qt are you using ? How did you installed it ?

        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,

          What version of Qt are you using ? How did you installed it ?

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

          @SGaist I'm using Qt 5.12.2 which is included in the apt-get repo for Ubuntu 19.04.

          A 1 Reply Last reply
          0
          • A anshah

            @SGaist I'm using Qt 5.12.2 which is included in the apt-get repo for Ubuntu 19.04.

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

            @anshah I figured it out guys. I had to install Top Icons Redux and adjusted some settings using the Gnome Tweak Tool. Everything is working fine now.

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

              Glad you found out and thanks for sharing !

              Would you mind giving a bit more details about what you did so other people can benefit ?

              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