Qt Namespace
El espacio de nombres Qt incluye los siguientes elementos del módulo QtGui. El espacio de nombres completo está documentado 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 plano plain en un párrafo con formato HTML conservando la mayor parte de su aspecto.
mode define cómo se tratan los espacios en blanco.
Esta función está definida en el fichero 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 tanto, sencilla. Comprueba principalmente si hay algo que parezca una etiqueta antes del primer salto de línea. Aunque el resultado puede ser correcto para casos comunes, no hay ninguna garantía.
Esta función está definida en el fichero de cabecera <QTextDocument>.
Nota: En versiones de Qt anteriores a la 6.7, esta función sólo tomaba 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.