本页内容

Text2DEntity QML Type

Text2DEntity 允许在 3D 空间中创建 2D 文本。更多内容...

Import Statement: import Qt3D.Extras 2.12
In C++: QText2DEntity
Status: Deprecated

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

属性

详细说明

Text2DEntity 组件将文本渲染为 XY 平面上的三角形。几何体将适配于指定宽度和高度的矩形内。如果生成的几何体宽度超过指定宽度,则剩余部分将渲染在新行上。

可通过添加变换组件来在场景中定位该实体。

Text2DEntity 将根据字符的形状生成几何体,并使用指定的颜色创建实心材质。

属性文档

alignment : Qt::Alignment

* * * 保持文本的对齐方式。

color : color

保存文本的颜色。

font : font

用于存储文本的字体。

height : real

存储文本边界矩形的高度。

text : string

存储用于网格的文本。

width : real

存储文本边界矩形的宽度。

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