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

QML Scene doesn't scale on High DPI configurations on Windows

XMLWordPrintable

      QML gives inconsistent results when using High DPI configurations or custom DPI settings. We used the attached 'DesktopScaleFactor.qml' in the following examples.

      On Mac OSX, QML rectangles are properly scaled when switching to Retina setting. The attached 'osx_retina.png' screenshot shows double-sized rectangles compared to 'osx_normal.png', as we expect.

      On Windows, when setting the 'Custom DPI Setting' to 200%, only the window border and the menu bar are scaled properly, while the rectangles keep their original size (as shown by 'win_100_percent.png' and 'win_200_percent.png' screenshots).

      For the last screenshot ('win_200_percent_unaware.png'), we modified the Qt code to not call QWindowsContext::user32dll.setProcessDPIAware() in QWindowsContextPrivate. Then the rectangles are properly scaled (directly by Windows) and the menu bar looks blurry. This behavior is closer to what we want, since the content scaling is at least correct.

        1. win_200_percent.png
          win_200_percent.png
          25 kB
        2. win_200_percent_unaware.png
          win_200_percent_unaware.png
          38 kB
        3. win_100_percent.png
          win_100_percent.png
          14 kB
        4. osx_retina.png
          osx_retina.png
          66 kB
        5. osx_normal.png
          osx_normal.png
          23 kB
        6. DesktopScaleFactor.qml
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sorvig Morten Sørvig
            mcmartin Alain Martin
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes