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

QTextLayout::draw mishandles clip

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: Widgets: Layout
    • Labels:
      None
    • Environment:
      obsercved on a Linux, but should be reproducible anywhere
    • Platform/s:
      Linux/X11

      Description

      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.

        Attachments

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

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes