Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.0
-
None
-
b06108350b1390b51886474628e03e2e84640548
Description
On destruction of the dynamic object the property that points to it is correctly set to null.
This value change however does not trigger the onDynamicObjectChanged handler as I would have expected.
import QtQuick 1.1 Rectangle { id: root width: 400 height: 300 property Item dynamicObject: null onDynamicObjectChanged: { console.log("dynamicObject changed to: " + dynamicObject) } Timer { interval: 1000 running: true repeat: true triggeredOnStart: true onTriggered: { console.log("current value of dynamicObject: "+ dynamicObject) } } Component { id: dynamicComponent Text { anchors.centerIn: parent text: "I'm so dynamic that I'm going to exist for one second only" } } Component.onCompleted: { dynamicObject = dynamicComponent.createObject(root) dynamicObject.destroy(1000) } }