QText2DEntity Class
class Qt3DExtras::QText2DEntityQText2DEntityを使用すると、3D空間に2Dテキストを作成できます。詳細...
ヘッダー | #include <Qt3DExtras/QText2DEntity> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
qmake | QT += 3dextras |
QML で | Text2DEntity |
を継承しています: | Qt3DCore::QEntity |
ステータス | 非推奨 |
プロパティ
パブリック機能
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 |
シグナル
void | colorChanged(const QColor &color) |
void | fontChanged(const QFont &font) |
void | heightChanged(float height) |
void | textChanged(const QString &text) |
void | widthChanged(float width) |
詳細説明
QText2DEntity は、テキストを XY 平面内の三角形としてレンダリングします。ジオメトリは、指定された幅と高さの矩形に収まります。結果のジオメトリが指定された幅よりも広い場合、残りは新しい行にレンダリングされます。
エンティティは、transform コンポーネントを追加することで、シーン内に配置できます。
QText2DEntity は、グリフの形状と指定された色を使用したソリッド マテリアルに基づくジオメトリを作成します。
プロパティのドキュメント
alignment : Qt::Alignment
Qt Quick シーンに表示されるテキストアイテムのアライメントを返します。
デフォルトは左上揃えです。
アクセス関数:
Qt::Alignment | alignment() const |
void | setAlignment(Qt::Alignment alignment) |
color : QColor
Qt Quick シーンに表示されるテキスト項目の色を保持する。
アクセス関数:
QColor | color() const |
void | setColor(const QColor &color) |
通知シグナル:
void | colorChanged(const QColor &color) |
font : QFont
Qt Quick シーンに表示されるテキスト項目のフォントを保持する。
アクセス関数:
QFont | font() const |
void | setFont(const QFont &font) |
通知シグナル:
void | fontChanged(const QFont &font) |
height : float
Qt Quick シーンに表示されているテキストアイテムの高さを返します。
アクセス関数:
float | height() const |
void | setHeight(float height) |
通知シグナル
void | heightChanged(float height) |
text : QString
Qt Quick シーンに表示されるテキストを保持する。
アクセス関数:
QString | text() const |
void | setText(const QString &text) |
通知シグナル:
void | textChanged(const QString &text) |
width : float
Qt Quick シーンに表示されるテキストアイテムの幅を返します。
アクセス関数:
float | width() const |
void | setWidth(float width) |
通知シグナル
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.