QMenu in QSytemTrayIcon misplaced in Windows 10
-
Hi,
I have written an addon for the software Anki in PyQt5. The addon aims at adding a system tray icon to the software.The code of the addon is reported here:
https://github.com/simgunz/anki21-addons_minimize-to-tray/blob/master/init.pyThe tray icon is created in the method
createSysTray
. The tray has a QMenu associated to it.The problem is that when right clicking the tray icon the QMenu is displayed in the wrong position. See the original issue reported here for an image displaying the problem.
https://github.com/simgunz/anki21-addons_minimize-to-tray/issues/1
I wrote a simple test script (also reported in issue #1 on github) to check if the problems appears also in a simple QApplication and it does not. The code to create the QSystemTrayIcon is pretty similar.
To test the full add-on one needs to install Anki 2.1 and then install the add on number 85158043 from
Tools > Addons
.I really have no clue where the problem comes from. Maybe someone here can help me debugging the problem or point me in the right direction.