Qt Namespace
O namespace Qt inclui os seguintes elementos do módulo QtGui. O namespace completo está documentado no módulo QtCore here.
Funções
| QString | convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode = WhiteSpacePre) |
| bool | mightBeRichText(QAnyStringView text) |
Documentação das funções
QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode = WhiteSpacePre)
Converte a sequência de texto simples plain em um parágrafo formatado em HTML, preservando a maior parte de sua aparência.
mode define como os espaços em branco são tratados.
Essa função está definida no arquivo de cabeçalho <QTextDocument>.
Veja também ` QString::toHtmlEscaped()` e ` mightBeRichText()`.
bool Qt::mightBeRichText(QAnyStringView text)
Retorna ` true ` se for provável que a string ` text ` seja texto formatado; caso contrário, retorna ` false`.
Essa função utiliza uma heurística rápida e, portanto, simples. Ela verifica principalmente se há algo que se pareça com uma tag antes da primeira quebra de linha. Embora o resultado possa estar correto em casos comuns, não há garantia.
Esta função está definida no arquivo de cabeçalho ` <QTextDocument> `.
Observação: Nas versões do Qt anteriores à 6.7, essa função aceitava apenas ` QString `.
© 2026 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.