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

Qt APIs and features do not provide a way to get non-integer DPI scaling without artifacts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.10.0 Alpha, 6.0
    • GUI: Painting
    • None

    Description

      Qt APIs and features do not provide a way to get correct DPI scaling without artifacts.

       

      Currently available APIs result in either incorrect scaling or painting artifacts as shown with the attached screenshots incorrect-scaling,png and artifact.png.

       

      The painting artifacts occur when using non-integer scaling. The examples here are using 150% scaling.

       

      The attached code can be built with defines showing the issue, and a FIX_SCALING define which proposes one solution based on changing the API for Qt 6 and is shown in correct-scaling.png. It is further described here:

       

       http://lists.qt-project.org/pipermail/development/2017-September/030935.html

       

      Any complete/correct solution will do. The QCoordinate is just a proposal.

       

      Attachments

        1. artifact.png
          artifact.png
          39 kB
        2. coordapi.cpp
          4 kB
        3. correct-scaling.png
          correct-scaling.png
          41 kB
        4. incorrect-scaling.png
          incorrect-scaling.png
          12 kB
        5. scaled-blurry.png
          scaled-blurry.png
          12 kB
        6. scaledlayout.cpp
          3 kB
        7. scaledpainter.cpp
          1 kB
        8. scaledpainter.png
          scaledpainter.png
          28 kB
        9. scaledpainter-cosmetic.png
          scaledpainter-cosmetic.png
          29 kB
        10. scaledpainter-oddsize.png
          scaledpainter-oddsize.png
          60 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            stkellyms Stephen Kelly (Work)
            Votes:
            8 Vote for this issue
            Watchers:
            15 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes