Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.9.4, 5.12.4
-
Windows 10 with scale factor set to > 100%
Description
In a High DPI enviroment (monitors > 100% scaling), and with Qt::AA_EnableHighDpiScaling enabled in the application, widgets geometry should reflect the scale factor of the screen they are displayed on.
QSystemTrayIcon widget doesn't appear to work. The geometry reported back is always at 100%, or equal to the actual screen resolution. If you have your scale factor set at 200%, the geometry reported back should be 1/2 the size, but it is not.
This requires us to do a manual workaround to apply the devicePixelRatio() to the coordinates supplied from the geometry() call.
This is easily reproduced using the Qt systray example app. I've attached a copy that I've modified to illustrate the issue. I'm logging the value for the geometry for the trayIcon when the setIcon() method is called. This is invoked by running the app and clicking on the icon in the systray. Observe the values output to the debug window.
Attachments
Issue Links
- relates to
-
QTBUG-79248 TrayIcons Menu does not scales its size when changing DPI
- Closed