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

Misbehavior of clipping done for ::paintEvent with hi-dpi fractional scaling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 5.13.1
    • GUI: Painting
    • None
    • Linux/X11
    • 19f29802bf7daafacd0fd824c2a1349e80eac536 (qt/qtbase/5.15)

    Description

      Given some fractional scaling, the clipping that is done internally for the paintEvent to the passed QRegion/QRect seems to not handle fractional scaled cases well.

      For Hi-DPI and scalings like 1.5 I get rendering artifacts in e.g. Konsole because at the "borders" of the clipped regions pixels are missed to be drawn.

      More details see

      https://bugreports.qt.io/browse/QTBUG-66036?focusedCommentId=479439&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-479439

      and

      https://bugreports.qt.io/browse/QTBUG-66036?focusedCommentId=479440&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-479440

      I traced that back to the internal transformation to device pixels, I think here some rounding happens into the wrong direction leading to too small clipping regions.

      This is similar in the effect like https://bugreports.qt.io/browse/QTBUG-78962
      but I see no workaround for this, as this is an internal behavior.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-78963
          # Subject Branch Project Status CR V

          Activity

            People

              vgt Eirik Aavitsland
              cullmann Christoph Cullmann
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes