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

[HighDPI multi-monitor Mixed screen scale factors] window frame shows with incorrect scaling

    XMLWordPrintable

Details

    • Windows
    • 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.

      hidpi-windowframe.tar.gz

      Attachments

        1. hidpi-windowframe.tar.gz
          2 kB
        2. qtbug77307_diag.diff
          10 kB
        3. qtbug77307_log.txt
          5 kB
        4. qtbug77307.jpg
          qtbug77307.jpg
          87 kB
        5. qtbug77307.zip
          3 kB

        Issue Links

          Activity

            People

              kleint Friedemann Kleint
              kkyzivat Keith Kyzivat
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: