Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. qsystemtrayicon
    Log in to post

    • UNSOLVED Determine tray icon locataion on screen.
      General and Desktop • qsystemtrayicon qscreen • • Dariusz  

      3
      0
      Votes
      3
      Posts
      61
      Views

      You can do something like this: QPoint tray_center = mTrayIcon->geometry().center(); QRect screen_rect = qApp->screenAt(tray_center)->geometry(); QPoint screen_center = screen_rect.center(); Qt::Corner corner = Qt::TopLeftCorner; if (tray_center.x() > screen_center.x() && tray_center.y() <= screen_center.y()) corner = Qt::TopRightCorner; else if (tray_center.x() > screen_center.x() && tray_center.y() > screen_center.y()) corner = Qt::BottomRightCorner; else if (tray_center.x() <= screen_center.x() && tray_center.y() > screen_center.y()) corner = Qt::BottomLeftCorner; So yeah, screenAt will give you the screen you're on and corner will tell you which corner of the screen are you in. Then you can use qApp->screenAt(tray_center)->availableGeometry() to determine the workable area of that screen and use the corner information to place your widget. You don't need to know if it's a primary , left or right screen. The available geometry is enough for your purpose.
    • UNSOLVED Qt System trayicon deployment issues on Linux Distros - Fedora 25,28,30 & CentOs 8.1.1
      Installation and Deployment • linux deployment plugins qsystemtrayicon linux fedora op • • rashida  

      2
      0
      Votes
      2
      Posts
      209
      Views

      Hi and welcome to devnet, AFAIK, there's no such list. Distributions may provide tray icon through different means and some patches Qt to support their custom system. Did you try on these distribution with their own versions of Qt to see how it's working ?
    • UNSOLVED QTrayIcon context menu and QWidgetAction
      General and Desktop • qsystemtrayicon qwidgetaction • • grisuthedragon  

      8
      1
      Votes
      8
      Posts
      662
      Views

      @Bonnie That could be a way, but this breaks with the OS style and I knew that some of our users will claim that this looks ugly. Then I have to search for a new idea representing the information in tray's menu.
    • UNSOLVED Win toast / balloon notifications stopped working recently on windows 10 with Qt
      General and Desktop • qsystemtrayicon toast shellnotifyico balloon-notific • • zwoelfer  

      4
      0
      Votes
      4
      Posts
      578
      Views

      @mrjj said in Win toast / balloon notifications stopped working recently on windows 10 with Qt: Hi tried your code (Qt 5.12.6) in winVer1803 which is rather old now. I didnt update to 1903 as had many issues at work with it. No toast was shown using your code. ( I did assign valid icon) So in what version did you actually see that code work ? I saw the code work on Windows 10 Enterprise winVer1803 in August. Now still on winVer1803 (with hotfixes KB4512576, KB4516115, KB4521861, KB4523203, KB4525237 installed in the meantime) it's not working as I said. But recently I tested the code on Windows 10 winVer1903, and it worked on Qt 5.7 and Qt 5.12, the test notification was showing up! It doesn't make any sense to me. I might have to try using the new Windows 10 api to post the notifications, which is ugly or maybe impossible with using Visual Studio 2015.
    • UNSOLVED When program quit, QSystemTrayIcon crashed.
      General and Desktop • qsystemtrayicon crashed • • ugiwgh  

      15
      0
      Votes
      15
      Posts
      3839
      Views

      Like @kshegunov already wrote using singleton should be avoided when possible and your use case really does't need any singleton. It sounds that you are rather creating tight coupling between your different classes rather that have a lean path to use system tray. So what are all these classes doing with the system tray icon and that menu ?
    • UNSOLVED In KDE + Qt 5.5.1 cannot change system tray icon's context menu items
      General and Desktop • qmenu qt 5.5.1 qsystemtrayicon kde • • luipugs  

      3
      0
      Votes
      3
      Posts
      1292
      Views

      I have the same issue with updating the context menu with Qt 5.6 on Ubuntu 16.04 KDE Neo.
    • UNSOLVED Minimal QSystemTrayIcon example in Ubuntu 12.04
      General and Desktop • qt 5.4.2 qsystemtrayicon ubuntu 12.04 • • luipugs  

      7
      0
      Votes
      7
      Posts
      2018
      Views

      I tested in Ubuntu 14.04 up to 15.10 and the tray icon is still not shown. The systray whitelist is not available any more in those distributions though, and I'd rather not have to install packages that bring back the tray icon like https://launchpad.net/~gurqn/+archive/ubuntu/systray-trusty. I thought Qt 5.4.2 already supported app indicators?
    • SOLVED QSystemTrayIcon Ubuntu 15.10
      General and Desktop • qsystemtrayicon ubuntu 15.10 • • Phenom  

      12
      0
      Votes
      12
      Posts
      3156
      Views

      OK, we found how to use -bundle... https://developer.apple.com/library/mac/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html
    • Taskbar Dropup
      General and Desktop • qt 5.4 qsystemtrayicon • • beardedarab64  

      12
      0
      Votes
      12
      Posts
      3130
      Views

      By reading the documentation I linked to and the examples also available from Qt. The "System Tray Icon" example is a good start.
    • [SOLVED] QSystemTrayIcon icon from resource file isn't showing
      General and Desktop • icon resource qsystemtrayicon • • nitzan  

      26
      0
      Votes
      26
      Posts
      11347
      Views

      Good, glad ya got it sorted out. Sorry I've been super busy lately and haven't lurked the forums here. :)
    • QSystemTrayIcon not working correctly under GNOME 3.14
      General and Desktop • linux qsystemtrayicon gnome • • David.G  

      6
      0
      Votes
      6
      Posts
      2367
      Views

      @Wieland Thanks for the reply. I'll verify with Ubuntu GNOME to see if the fix has been backported to Ubuntu. For future reference: I'm using the libraries provided by the official Ubuntu repositories.