Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0
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
- relates to
-
QTBUG-32583 QTextDocument::characterCount() has an offset of one character
- Reported