Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89646

Window move between mixed scale factor monitors on Windows doesn't work right



    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: GUI: High-DPI
    • Environment:
      Windows 10. At least two monitors at different scale factors.
    • Platform/s:


      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


          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              sorvig Morten Sørvig
              jeremyhp Jeremy Cook
              PM Owner:
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              2 Vote for this issue
              8 Start watching this issue



                  Gerrit Reviews

                  There are no open Gerrit changes