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

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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        1. DesktopScaleFactor.qml
          0.5 kB
        2. osx_normal.png
          osx_normal.png
          23 kB
        3. osx_retina.png
          osx_retina.png
          66 kB
        4. win_100_percent.png
          win_100_percent.png
          14 kB
        5. win_200_percent_unaware.png
          win_200_percent_unaware.png
          38 kB
        6. win_200_percent.png
          win_200_percent.png
          25 kB

        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
              mcmartin Alain Martin
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes