Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. QMenu in QSytemTrayIcon misplaced in Windows 10

QMenu in QSytemTrayIcon misplaced in Windows 10

Scheduled Pinned Locked Moved Unsolved Qt for Python
1 Posts 1 Posters 448 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.
  • S Offline
    S Offline
    simgunz
    wrote on last edited by
    #1

    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.py

    The 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.

    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