Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.2.4
-
None
Description
Hello,
When adding a QMenu to a QSystemTrayIcon the menu ends up in the wrong position when you switch from a small to a large screen.
The issue can be easily replicable by simply launching it on a laptop screen, then switching to a monitor with higher DPI.
I saw this ticket but it has been closed and was reported as fixed: QTBUG-63006
Seems there are some issues with the Jira server so I cannot attach anything right now, code can be found below for now.
// code placeholder from PySide6.QtWidgets import QApplication, QMenu, QSystemTrayIcon from PySide6.QtGui import QAction, QIcon if __name__ == '__main__': app = QApplication([]) # Create the tray tray = QSystemTrayIcon(icon=(QIcon("icon.png"))) tray.setVisible(True) # Create the right click menu menu = QMenu() menu.setToolTipsVisible(True) # Add an example option menu_option = QAction("Example") menu.addAction(menu_option) # Add the menu to the tray tray.setContextMenu(menu) # Launch GUI app.exec()
Attachments
Issue Links
- duplicates
-
QTBUG-63006 Windows: menu on tray icon wrongly positioned with High DPI scaling
- Closed