QText2DEntity Class
class Qt3DExtras::QText2DEntityQText2DEntity 允许在 3D 空间中创建 2D 文本. More...
属性
- 3 个属性继承自 Qt3DCore::QNode
- 1 个属性继承自 QObject
公有函数
QColor | color() const |
QFont | font() const |
float | height() const |
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 |
- 4 个公有函数继承自 Qt3DCore::QEntity
- 11 个公有函数继承自 Qt3DCore::QNode
- 32 个公有函数继承自 QObject
信号
void | colorChanged(const QColor &color) |
void | fontChanged(const QFont &font) |
void | heightChanged(float height) |
void | textChanged(const QString &text) |
void | widthChanged(float width) |
- 4 个信号继承自 Qt3DCore::QNode
- 2 个信号继承自 QObject
其他继承的成员
- 3 个公有槽函数继承自 Qt3DCore::QNode
- 1 个公有槽函数继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 2 个受保护的函数继承自 Qt3DCore::QNode
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
Detailed Description
QText2DEntity 将文本呈现为 XY 坐标平面中的三角形. 几何体将放置在指定宽度和高度的矩形中. 如果生成的几何图形比指定的宽度宽, 则其余部分将显示在新的一行.
通过添加变换组件, 可以在场景中定位实体.
QText2DEntity 将根据字形的形状和使用指定颜色的实体材料创建几何体.
属性
color : QColor
保存在 Qt Quick 场景中显示的文本项的颜色.
访问函数:
QColor | color() const |
void | setColor(const QColor &color) |
Notifier signal:
void | colorChanged(const QColor &color) |
font : QFont
保存在 Qt Quick 场景中显示的文本项的字体.
Access functions:
QFont | font() const |
void | setFont(const QFont &font) |
Notifier signal:
void | fontChanged(const QFont &font) |
height : float
返回在 Qt Quick 场景中显示的文本项的高度.
Access functions:
float | height() const |
void | setHeight(float height) |
Notifier signal:
void | heightChanged(float height) |
text : QString
保存在 Qt Quick 场景中显示的文本.
Access functions:
QString | text() const |
void | setText(const QString &text) |
Notifier signal:
void | textChanged(const QString &text) |
width : float
返回在 Qt Quick 场景中显示的文本项的宽度.
Access functions:
float | width() const |
void | setWidth(float width) |
Notifier signal:
void | widthChanged(float width) |