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. coordapi.cpp
          4 kB
          Stephen Kelly (Work)
        2. artifact.png
          39 kB
          Stephen Kelly (Work)
        3. correct-scaling.png
          41 kB
          Stephen Kelly (Work)
        4. incorrect-scaling.png
          12 kB
          Stephen Kelly (Work)
        5. scaledpainter.png
          28 kB
          Morten Sørvig
        6. scaledpainter-oddsize.png
          60 kB
          Morten Sørvig
        7. scaled-blurry.png
          12 kB
          Stephen Kelly (Work)
        8. scaledpainter.cpp
          1 kB
          Morten Sørvig
        9. scaledpainter-cosmetic.png
          29 kB
          Morten Sørvig
        10. scaledlayout.cpp
          3 kB
          Stephen Kelly (Work)
        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