Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.12.4
-
Windows 10, Two displays - one at scale factor 250%, one at scale factor 100%, app launched from the secondary display.
-
-
8f2db974ab594125301aac62594510e146125cb4 (qtbase/5.14, 9.11.2019, 5.14.0)
Description
When showing windows for the first time on the non-primary display in a mixed-scale factor multi-monitor (2 monitors tested) environment, the window is scaled relative to the scale factor of the primary display (incorrect behavior), yet shown on the monitor in which the mouse pointer is showing (correct behavior).
Scenario 1
- Windows 10
- Primary monitor resolution 3840x2160, scale factor 250%
- Secondary monitor resolution 1920x1080, scale factor 100%
- Test app launched from secondary display (mouse pointer on secondary display prior to app launch)
In this case, "Hello World 1" window has a frame size scaled larger, by 3x the width and height it should be showing, shown on the secondary display (which is the 100% scaled display).
Scenario 2
- Windows 10
- Primary monitor resolution 1920x1080, scale factor 100%
- Secondary monitor resolution 3840x2160, scale factor 250%
- Test app launched from secondary display (mouse pointer on secondary display prior to app launch)
In this case, "Hello World 1" window has a frame size unscaled when it should be scaled by 3x, shown on the secondary display (which is the 250% scaled display in this scenario).
This all occurs if you are setting an explicit size to the window using setFixedSize(), setMinimumSize() or resize().
The second window that the example shows is showing a workaround to the issue, which may provide insight as to what is going wrong. The workaround is to show the window minimized, hide it immediately, then call showNormal() to show the window with proper sizing.
Attachments
Issue Links
- relates to
-
QTBUG-77086 Context menus mis-positioned in dual HighDPI screens
- Reported
-
QTBUG-78320 [HighDPI multi-monitor Mixed screen scale factors] QCursor::setPos setting incorrect positions on non-primary monitor
- Reported
-
QTBUG-79630 tooltip global position wrong with dual screen different highDPI
- Closed