Qt Namespace
El espacio de nombres Qt incluye los siguientes elementos del módulo QtGui. El espacio de nombres completo se documenta en el módulo QtCore here.
Funciones
| QString | convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode = WhiteSpacePre) |
| bool | mightBeRichText(QAnyStringView text) |
Documentación de funciones
QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode = WhiteSpacePre)
Convierte la cadena de texto sin formato « plain » en un párrafo con formato HTML, conservando la mayor parte de su aspecto.
mode Define cómo se gestionan los espacios en blanco.
Esta función está definida en el archivo de cabecera <QTextDocument>.
Véase también ` QString::toHtmlEscaped()` y ` mightBeRichText()`.
bool Qt::mightBeRichText(QAnyStringView text)
Devuelve « true » si es probable que la cadena « text » sea texto enriquecido; en caso contrario, devuelve « false ».
Esta función utiliza una heurística rápida y, por lo tanto, sencilla. Básicamente, comprueba si hay algo que se parezca a una etiqueta antes del primer salto de línea. Aunque el resultado puede ser correcto en los casos más habituales, no hay garantía alguna.
Esta función está definida en el archivo de cabecera <QTextDocument>.
Nota: En las versiones de Qt anteriores a la 6.7, esta función solo aceptaba « 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.