<html><body>Hello,<br>the example Systray.py mostly works, but not exactly as it should. It is also affected by some of the strange things I have met in my app. Apparently, there are some bugs/limitations for Unity+Qt... :( Since it is probably not PyQt related as you said, I will try to collect them and report on Qt bug tracker and hope it can and will be fixed. Because right now, context menu of system tray icon on Ubuntu (Unity) is behaving so messy, that it is only useful to display a few static options and nothing else :(<br>Just for example, some of the bugs on Ubuntu (Unity):<br>QSystemTrayIcon.activated signal not emitted<br>QSystemTrayIcon.contextMenu().aboutToHide signal not emitted (funny thing - signal aboutToShow is working properly)<br>QSystemTrayIcon.contextMenu().isVisible() function returns False even if menu is displayed<br>QSystemTrayIcon.contextMenu().show() slot is creating a duplicit ghost menu somewhere on the screen<br>QSystemTrayIcon.contextMenu().hide() slot is not working<br>QSystemTrayIcon.contextMenu().QAction().hovered signal not emitted<br>QSystemTrayIcon.contextMenu().move(x, y) function is not working<br><br>Thank you for your suggestions anyway!<br><br><aside>
----------------------------------------</aside><blockquote data-email="email@example.com">On Fri, Jun 30, 2017 at 03:33:06PM +0200, firstname.lastname@example.org wrote:
<br>> Ubuntu 16.04 - Unity
<br>> Qt v5.8.0
<br>> PyQt v5.8.2
<br>> However, I also tested "incorrect isHidden()" and "not working move()" in
<br>> Kubuntu with KDE, Qt 5.8 and it did not work neither. I will gladly provide
<br>> any other info if needed. :)
<br>On both Unity and Plasma, Qt is using the Status Notifier protocol.
<br>So most of the issues you described are actually limitations of either that
<br>protocol or its implementations (indicator-application, Plasma tray), not
<br>bugs in Qt.
<br>Regarding updating the menu when the icon is hidden, it should work fine
<br>on Unity. Can you check if the systray example from qtbase examples works
<br>for you (it has dynamically enabled/disabled Minimize, Maximize, Close
<br>In any case, this is definitely not specific to PyQt, so it should be better
<br>discussed in the Qt bug tracker.
</blockquote><p>---------------------------------------- </p><blockquote data-email="email@example.com"><br></blockquote></body></html>