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

QGraphicsTextItem font gets incorrectly clipped when a clip rect is set on the painter.

    XMLWordPrintable

Details

    • All
    • 724e4646e2 (qt/qtbase/dev) 724e4646e2 (qt/tqtc-qtbase/dev) 2e2d544588 (qt/qtbase/6.2) 2e2d544588 (qt/tqtc-qtbase/6.2) b0b88f3420 (qt/qtbase/6.3) b0b88f3420 (qt/tqtc-qtbase/6.3) 41637c0727 (qt/tqtc-qtbase/5.15)

    Description

      The attached repro and gif shows the issue where text glyphs in a graphics scene gets clipped when another item is moved over them. This is because when moving a graphics item the clip rect is set to avoid repainting more than needed.

      I debugged it a bit and found 2 issues in the raster engine that contributed to this, see attached patch for a suggested fix. Not sure if it is the correct thing to do but from my debugging it seemed like the clip rect was always correct, and it only really fails for this case so I just assumed this code needed to be adjusted.

      Attachments

        1. font clipping.gif
          376 kB
          Viktor Arvidsson
        2. font clipping patch.diff
          2 kB
          Viktor Arvidsson
        3. font clipping repro.cpp
          0.7 kB
          Viktor Arvidsson
        For Gerrit Dashboard: QTBUG-93432
        # Subject Branch Project Status CR V

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            cyriuz Viktor Arvidsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes