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

QTextLayout doesn't layout correctly with trailing tabs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.2.1
    • GUI: Text handling
    • None
    • Windows 7, VS 2010

    Description

      When layouting a line has trailing tabs using QTextLine::setLineWidth with QTextOption::IncludeTrailingSpaces, a line doesn't be layouted correctly.

      In other words QTextLine::layout_helper() produce one tab character difference.

      To solve this problem, I've inserted following codes into QTextLayout.cpp line 1785

      if (lbh.checkFullOtherwiseExtend(line))

      { lbh.spaceData.textWidth -= tabWidth; goto found; }

      I think above codes can help error correction.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            qrgscor RiJong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes