QText2DEntity Class
class Qt3DExtras::QText2DEntityQText2DEntity ermöglicht die Erstellung eines 2D-Textes im 3D-Raum. Mehr...
Kopfzeile: | #include <Qt3DExtras/QText2DEntity> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
qmake: | QT += 3dextras |
In QML: | Text2DEntity |
Vererbt: | Qt3DCore::QEntity |
Status: | Veraltet |
Eigenschaften
Öffentliche Funktionen
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 |
Signale
void | colorChanged(const QColor &color) |
void | fontChanged(const QFont &font) |
void | heightChanged(float height) |
void | textChanged(const QString &text) |
void | widthChanged(float width) |
Detaillierte Beschreibung
Die QText2DEntity rendert Text als Dreiecke in der XY-Ebene. Die Geometrie wird in das Rechteck der angegebenen Breite und Höhe eingepasst. Wenn die resultierende Geometrie breiter als die angegebene Breite ist, wird der Rest auf der neuen Linie gerendert.
Das Objekt kann durch Hinzufügen einer Transformationskomponente in der Szene positioniert werden.
QText2DEntity erzeugt eine Geometrie, die auf der Form der Glyphen und einem festen Material mit der angegebenen Farbe basiert.
Dokumentation der Eigenschaft
alignment : Qt::Alignment
Gibt die Ausrichtung des Textelements zurück, das in der Szene Qt Quick angezeigt wird.
Die Standardausrichtung ist oben-links ausgerichtet.
Zugriffsfunktionen:
Qt::Alignment | alignment() const |
void | setAlignment(Qt::Alignment alignment) |
color : QColor
Enthält die Farbe für das Textelement, das in der Szene Qt Quick angezeigt wird.
Zugriffsfunktionen:
QColor | color() const |
void | setColor(const QColor &color) |
Melder-Signal:
void | colorChanged(const QColor &color) |
font : QFont
Enthält die Schriftart für das Textelement, das in der Szene Qt Quick angezeigt wird.
Zugriffsfunktionen:
QFont | font() const |
void | setFont(const QFont &font) |
Melder-Signal:
void | fontChanged(const QFont &font) |
height : float
Gibt die Höhe des Textelements zurück, das in der Szene Qt Quick angezeigt wird.
Zugriffsfunktionen:
float | height() const |
void | setHeight(float height) |
Melder-Signal:
void | heightChanged(float height) |
text : QString
Enthält den Text, der in der Szene Qt Quick angezeigt wird.
Zugriffsfunktionen:
QString | text() const |
void | setText(const QString &text) |
Melder-Signal:
void | textChanged(const QString &text) |
width : float
Gibt die Breite des Textelements zurück, das in der Szene Qt Quick angezeigt wird.
Zugriffsfunktionen:
float | width() const |
void | setWidth(float width) |
Melder-Signal:
void | widthChanged(float width) |
© 2025 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.