Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.5, 5.13.2, 5.14.1
-
Any Windows system with multiple monitors attached, and at least one of the monitors at 200% or more scaling.
-
-
529cfe4e22cc02dc7c29f653e8ff23656aa16ff9 (qt/qtbase/5.14) 08d5059320334223ff1f9009342324f25c231f0b (qt/qtbase/5.14)
Description
QScrollArea does not work correctly in a mixed DPI environment in Windows. This appears to be tied to a window that is native ( uses winId() ). When the window is moved from a monitor scaled at 100% to a monitor scaled at 200% or higher, the scroll area disappears, along with any contents within. There are also some QScrollArea artifacts on the screen that disappear once the window is resized. Once the window is moved back to the 100% scaled monitor, it is back to normal again (once you resize it- it initially still is incorrect).
This is easily reproduced with the simple application I've attached. The application creates scroll area and a main view, and sets the view of the scroll area to that view. It then calls winId() to get a native window handle, and then calls BitBlt to paint the view white. When launched, it works great on the 100% scaled monitor, but not on the 200% scaled monitor (appears black).
This is a show-stopper for us moving our application to newer versions of Qt. We do direct screen rendering using OpenGL and Direct3D and need to be able to render on a native window.
Note: This behavior does NOT happen if the Qt property AA_EnableHighDPIScaling is not specified. However, we rely on that to make our application DPI aware.
None of the 5.9.x versions of Qt exhibit this. Versions 5.12 up to 5.12.4 are ok, but 5.12.5 and beyond are broken. All major versions beyond 5.12 are also broken.
Attached is the application, along with some screen shots of the behavior.
Attachments
Issue Links
- relates to
-
QTBUG-71368 [HiDPI]Coordinate system conversion functions do not work properly with negative coordinates (native child windows)
- Closed
-
QTBUG-79166 [REG 5.12.4->5.12.5][HiDPI] Native window children have incorrect position on secondary screen
- Closed
For Gerrit Dashboard: QTBUG-82312 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
277451,5 | Fix geometry handling for native child windows | 5.14 | qt/qtbase | Status: MERGED | +2 | 0 |
291441,4 | qwindowswindow: Fix screen changes between different DPI screens for native windows | 5.14 | qt/qtbase | Status: MERGED | +2 | 0 |