Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.14.1
-
None
Description
Provide a way to check the plain text characters of qquicktext, excluding characters that are markup. Ideally exposing something like QTextDocument::toPlainText. Our use case is to truncate certain text fields based on a max character count.
A not so nice workaround is to use a parallel QTextDocument instance, but this would only yield correct results in case of RichText, not in case of StyledText:
doc = QTextDocument() doc.setHtml(markupText) text = doc.toPlainText()