我在 Qt 5.9.1 for mac 中测试了这段代码,qtcreator 报错:ExtrudedTextMesh is not a type。
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
}
]
}