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

QTextLayout::draw mishandles clip

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.14.2
    • Widgets: Layout
    • None
    • obsercved on a Linux, but should be reproducible anywhere
    • Linux/X11

      1. Create a QTextLayout for a plain text QString consisting of two lines
      2. Prepare layout with a loop calling createLine as per QTextLayout documentation
      3. call draw() on this layout, giving it a clip parameter that is about one and half lines high

      Expected: displayed text is clipped as per clip parameter.  One of the lines is visible, the other is clipped to half-height.

      Actual: both lines are visible. Per my reading (and stepping through) the source code, it correctly decides to draw both lines because they both have visible part in the clip area, but skip the actual clipping because there is no selection and excludedRegion remains null.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alex.verkhovsky Alex Verkhovsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes