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

QQuickWindow: Inconsistent size when resizing via win32 SetWindowPos

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.2.1
    • None
    • Windows 10 Pro 20H2, Screen Setup: Main Display: 1920x1080, scaling 150%, Display 2: 1920x1080, scaling 100% (on the left of the main display)
    • Windows

    Description

      In my setup I have the main HD display scaled at 150% and the HD display on the left scaled at 100%.

      I have a QQuickWindow placed on the left screen at (-500, 384) with size (500, 100) that eventually must reach the position (500,384) keeping its size.

      In the first scenario, I have a timer that increase the x coordinate so that eventually the window is on the primary screen. As you see from the log, when the window crosses the edge its size becomes 333 (500/1.5 devicePixelRatio of the primary screen).

      In the second scenario, I make one call to SetWindowPos to set the final position and you can see from the log that this time the width is 500.

      I guess the problem lies in the chicken/egg situation that getting the final screen depends on the geometry, but the geometry depends on the screen the window is on.

       

      Attachments

        1. SetWindowPosIssue.zip
          2 kB
          Lorenzo Lucignano

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              lorenzolightsgdwarf Lorenzo Lucignano
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes