如你所知,Qt3DQuickWindow是一个定制的窗口,用于在3d场景中显示3d实体,并且是3dScene的最佳替代方案,它可以加载所有与植入无关的材料。(与alpha和许多其他自定义材质相关的3d场景无法实现的功能)
此时,我想在Qt3DQuickWindow上显示一个3d场景,并在3d场景和3d环境上显示我的qml项,但在Qt3DQuickWindow中没有用于添加我的qml项的QQmlEngine。
有没有什么办法可以覆盖在qml 3d场景的顶部。
tnx。

发布于 2020-01-05 10:43:17
使用允许将3D内容嵌入到QQmlEngine窗口中的View3D QML类型
main.qml
import QtQuick 2.14
import QtQuick.Window 2.12
import QtQuick3D 1.14
Window {
width: 1280
height: 720
visible: true
View3D {
/* put your 3d scene here */
}
/* overlay item */
Rectangle {
width: 500
height: 200
anchors.margins: -10
color: "#e0e0e0"
border.color: "#000000"
border.width: 1
opacity: 0.8
}
}https://stackoverflow.com/questions/59589839
复制相似问题