Qt Namespace
The Qt namespace includes the following elements from module QtGui. The full namespace is documented in module QtCore here.
Functions
QString | convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode = WhiteSpacePre) |
bool | mightBeRichText(QAnyStringView text) |
Function Documentation
QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode = WhiteSpacePre)
Converts the plain text string plain to an HTML-formatted paragraph while preserving most of its look.
mode defines how whitespace is handled.
This function is defined in the <QTextDocument>
header file.
See also QString::toHtmlEscaped() and mightBeRichText().
bool Qt::mightBeRichText(QAnyStringView text)
Returns true
if the string text is likely to be rich text; otherwise returns false
.
This function uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee.
This function is defined in the <QTextDocument>
header file.
Note: In Qt versions prior to 6.7, this function took QString only.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.