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

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

XMLWordPrintable

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

      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.

        1. TestCase-32583.zip
          0.5 kB
          Christian Loose
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes