本页内容

Qt3DExtras::QExtrudedTextMesh Class

class Qt3DExtras::QExtrudedTextMesh

一个3D挤出文本网格。更多内容...

标题: #include <Qt3DExtras/QExtrudedTextMesh>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
在 QML 中: ExtrudedTextMesh
继承自: Qt3DRender::QGeometryRenderer
状态: 已弃用

该类已弃用。我们强烈建议不要在新代码中使用它。

属性

公共函数

QExtrudedTextMesh(Qt3DCore::QNode *parent = nullptr)
float depth() const
QFont font() const
QString text() const

公共槽位

void setDepth(float depth)
void setFont(const QFont &font)
void setText(const QString &text)

信号

void depthChanged(float depth)
void fontChanged(const QFont &font)
void textChanged(const QString &text)

详细说明

网格的原点是文本基线的左后端。

属性文档

depth : float

保存文本的浮雕深度。

访问函数:

float depth() const
void setDepth(float depth)

通知信号:

void depthChanged(float depth)

font : QFont

存储文本的字体。

网格几何体将根据字体的 pointSize 进行归一化处理,因此 pointSize 越大,生成的文本会越平滑,而非越大。不应使用 pixelSize。

访问函数:

QFont font() const
void setFont(const QFont &font)

通知信号:

void fontChanged(const QFont &font)

text : QString

存储用于网格的文本。

访问函数:

QString text() const
void setText(const QString &text)

通知器信号:

void textChanged(const QString &text)

成员函数文档

[explicit] QExtrudedTextMesh::QExtrudedTextMesh(Qt3DCore::QNode *parent = nullptr)

使用parent 创建一个新的QText3DMesh。

© 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.