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

Update QTextDocument::characterCount() for Qt 6

    XMLWordPrintable

Details

    Description

      QtTextDocument::characterCount() return currently 1 even if the document is empty.

      The QTextDocument will contain a single paragraph separator (unicode 0x2029)
      when it is empty because it contains an empty block. This is a formatting
      character, which is invisible, but is still counted as a character in the
      document.

      This is not documented well and is very misleading. 

      Users have requested that characterCount should return 0 if the document is empty.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              tero.pelkonen Tero Pelkonen
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes