Qt3DExtras::QText2DEntity Class
class Qt3DExtras::QText2DEntityQText2DEntity permite crear texto en 2D en un espacio 3D. Más información...
| Encabezado: | #include <Qt3DExtras/QText2DEntity> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| En QML: | Text2DEntity |
| Heredado de: | Qt3DCore::QEntity |
| Estado: | Obsoleto |
Esta clase está obsoleta. Se desaconseja encarecidamente su uso en código nuevo.
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 representa el texto como triángulos en el plano XY. La geometría se ajustará al rectángulo de anchura y altura especificadas. Si la geometría resultante es más ancha que la anchura especificada, el resto se representará en una nueva línea.
La entidad se puede colocar en la escena añadiendo un componente de transformación.
QText2DEntity creará la geometría basándose 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 predeterminada es la alineación superior izquierda.
Funciones de acceso:
| Qt::Alignment | alignment() const |
| void | setAlignment(Qt::Alignment alignment) |
color : QColor
Almacena 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 de notificación:
| void | colorChanged(const QColor &color) |
font : QFont
Almacena la fuente del elemento de texto que se muestra en la escena « Qt Quick ».
Funciones de acceso:
| QFont | font() const |
| void | setFont(const QFont &font) |
Señal de notificación:
| 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 de notificación:
| 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 de notificación:
| 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 de notificación:
| 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.