Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.2
-
Windows 10. At least two monitors at different scale factors.
Description
Programmatic moving of a window ( either with a setGeometry() or move() call ) between monitors of mixed scale factors does not work correctly. As the window is moved between the monitors, it can jump around unpredictably until it is fully relocated to the other monitor. This only happens when Qt::AA_EnableHighDpiScaling is set.
This behavior does not happen if the window is moved using the windows title bar.
Our application uses windows without title bars, so we have need to programmatically move it based on cursor location.
I've attached a sample Qt program that illustrates this behavior. If you click and drag in the window, it will move the window starting from the upper left corner. Try dragging this between two monitors at different scale factors (e.g. 100% and 150%) and observe the behavior. Then try dragging the window using the title bar and observe the difference.
Of note, there are lots and lots of "QWindowsWindow::setGeometry: Unable to set geometry...." messages as the erratic window behavior is happening, not sure if that's related or not.
Here's a link to a video illustrating this behavior: https://photos.app.goo.gl/MWo7hxjYo36hUZ8WA
Attachments
Issue Links
- relates to
-
QTBUG-84090 Unable To setGeometry when programmatically moving frameless QMainWindow between Screens with different DPI
- Reported
-
QTBUG-76831 Frameless window incorrectly resizing when moved between monitors with varying DPI settings
- Reported