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

QTextDocument::characterCount() has an offset of one character

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.5.2, 5.0.2
    • GUI: Text handling
    • None

    Description

      Steps to reproduce / test case
      Create an instance of QTextDocument with text "abc" and access its characterCount() method, this will return an character count of 4 instead of 3.

      The QTextDocument seems to contain the single paragraph separator also when it is non-empty.

      A testcase project is attached.

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              cloose Christian Loose
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes