Qt3DExtras::QText2DEntity Class
class Qt3DExtras::QText2DEntityQText2DEntity permite la creación de un texto 2D en un espacio 3D. Más...
| Cabecera: | #include <Qt3DExtras/QText2DEntity> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras)target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| En QML: | Text2DEntity |
| Hereda: | Qt3DCore::QEntity |
| Status: | Obsoleto |
Propiedades
Funciones públicas
| Qt::Alignment | alignment() const |
| QColor | color() const |
| QFont | font() const |
| float | height() const |
| void | setAlignment(Qt::Alignment alignment) |
| void | setColor(const QColor &color) |
| void | setFont(const QFont &font) |
| void | setHeight(float height) |
| void | setText(const QString &text) |
| void | setWidth(float width) |
| QString | text() const |
| float | width() const |
Señales
| void | colorChanged(const QColor &color) |
| void | fontChanged(const QFont &font) |
| void | heightChanged(float height) |
| void | textChanged(const QString &text) |
| void | widthChanged(float width) |
Descripción detallada
QText2DEntity renderiza texto como triángulos en el plano XY. La geometría se encajará en el rectángulo de anchura y altura especificadas. Si la geometría resultante es más ancha que la anchura especificada, el resto se renderizará en la nueva línea.
La entidad puede posicionarse en la escena añadiendo un componente de transformación.
QText2DEntity creará una geometría basada en la forma de los glifos y un material sólido utilizando el color especificado.
Documentación de propiedades
alignment : Qt::Alignment
Devuelve la alineación del elemento de texto que se muestra en la escena Qt Quick.
La alineación por defecto es arriba a la izquierda.
Funciones de acceso:
| Qt::Alignment | alignment() const |
| void | setAlignment(Qt::Alignment alignment) |
color : QColor
Mantiene el color del elemento de texto que se muestra en la escena Qt Quick.
Funciones de acceso:
| QColor | color() const |
| void | setColor(const QColor &color) |
Señal del notificador:
| void | colorChanged(const QColor &color) |
font : QFont
Mantiene el tipo de letra para el elemento de texto que se muestra en la escena Qt Quick.
Funciones de acceso:
| QFont | font() const |
| void | setFont(const QFont &font) |
Señal del notificador:
| void | fontChanged(const QFont &font) |
height : float
Devuelve la altura del elemento de texto que se muestra en la escena Qt Quick.
Funciones de acceso:
| float | height() const |
| void | setHeight(float height) |
Señal del notificador:
| void | heightChanged(float height) |
text : QString
Contiene el texto que se muestra en la escena Qt Quick.
Funciones de acceso:
| QString | text() const |
| void | setText(const QString &text) |
Señal del notificador:
| void | textChanged(const QString &text) |
width : float
Devuelve la anchura del elemento de texto que se muestra en la escena Qt Quick.
Funciones de acceso:
| float | width() const |
| void | setWidth(float width) |
Señal del notificador:
| void | widthChanged(float width) |
© 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.