我在Qt 5.9.1中为mac测试了此代码,qtcreator报告错误:ExtrudedTextMesh不是类型。
import QtQuick 2.0
import Qt3D.Core 2.0
import Qt3D.Extras 2.0
// 3D 文本示例
Entity{
components: [
// bug: ExtrudedTextMesh is not a type, Qt 5.9.1 mac
ExtrudedTextMesh {
text: "Hello 3D"
depth: 0.2
},
PhongAlphaMaterial{
id: colorMaterial
ambient: Qt.rgba( 1, 0, 0, 1.0 )
diffuse: Qt.rgba( 1, 0, 0, 1.0 )
specular: Qt.rgba(1, 0, 0, 1.0 )
shininess: 1.0
alpha: 0.5
}
]
}