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

HiDPI/DPR scaling leads to blurry pixmaps

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.14.0
    • 5.12.6, 5.13.2
    • GUI: Painting
    • None

    Description

      The attached example shows the same pixmap twice, once with the default-deduced DPR value (i.e. the DPR value set on the pixmap as displayed on the left side of the screenshots below) and once with a DPR value taken directly from the window (cf. right hand side, where we overwrite the DPR value of the pixmap).

      When using anything older than 5.14, or even using 5.14 and then setting any of the environment variables that trigger DPR scaling, the result will look like in the attached images. Note how the pixmap on the left is always unsharp.

      What's really odd is that when I run the example against 5.14 rc 1 on windows with a hidpi screen, then the images look sharp but will use the smaller pixmap with dpr 1. This is unexpected, it should use the @2x pixmap with DPR 2, since that should fit into the QSize(250, 250) target area.

      Attachments

        1. fractional-dpi-broken.png
          39 kB
          Milian Wolff
        2. hidpi-broken.png
          47 kB
          Milian Wolff
        3. lowdpi.png
          14 kB
          Milian Wolff
        4. qtbug80571.zip
          22 kB
          Milian Wolff
        5. qtbug80571.zip
          23 kB
          Friedemann Kleint
        6. qtdiag.5.12.4.txt
          7 kB
          Milian Wolff
        7. qtdiag.5.14.rc1.txt
          7 kB
          Milian Wolff
        8. Screenshot_20191210_164716.png
          52 kB
          Milian Wolff

        Activity

          People

            vgt Eirik Aavitsland
            milianw Milian Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: