Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.15.17
-
None
Description
The application crashed when the QML of the window was unloaded using the loader with the source of the QQ3D texture.
I know that if I don't use the Texture source in QQ3D and use an Image for the sourceItem, the application won't crash.
However, in that case, there is a problem where the Texture is not updated even if the Image source is changed.
[QTBUG-132884] Changing the image source does not change the QQ3D texture. - Qt Bug Tracker
The QML code is follows:
import QtQuick 2.15 import QtQuick3D 1.15 Item { id: root objectName: "DisplayArea3DCrashed.qml" implicitWidth: 1000 implicitHeight: 760 clip: true property alias source: texture.source Node{ id: mainScene DirectionalLight{ ambientColor: "#cccccc" eulerRotation.x: 0 eulerRotation.y: 0 eulerRotation.z: 0 brightness: 100 } Model { source: "#Rectangle" materials: DefaultMaterial { diffuseMap: Texture { id: texture } } } PerspectiveCamera { id: sceneCamera fieldOfView: 45 x: 0 y: -500 z: 500 eulerRotation.x: 45 } } Rectangle{ id: container anchors.fill: parent border.color: "black" gradient: Gradient{ GradientStop{position: 0.0; color: "#000000"} GradientStop{position: 1.0; color: "#7F7FFF"} } View3D{ id: mainView anchors.fill: parent importScene: mainScene camera: sceneCamera renderMode: View3D.Offscreen } Text { text: root.source color: "white" font.pixelSize: 24 } } }