Details
-
Sub-task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
Win 7 x64, Qt 5.1.1 x64
Description
Consider the following script:
import QtQuick 2.1 import QtQuick.Controls 1.0 Item { property var listOfQVectors: [] Component { id: component QtObject { property vector3d v: Qt.vector3d(0,0,0) } } Column { Button { text: "create, delete" onClicked: { var object = component.createObject(parent, {"objectName": "hello"}) listOfQVectors.push(object.v); // workaround : listOfQVectors.push(Qt.vector3d(object.v.x, object.v.y, object.v.x)); listOfQVectorsChanged() print("before destroy: " +listOfQVectors[0]) object.destroy(); } } Button { text: "print" onClicked: print("after destroy: " +listOfQVectors[0]) } } }
I get the following output:
before destroy: QVector3D(0, 0, 0) after destroy: undefined
Attachments
Issue Links
- relates to
-
QTBUG-25636 QML Coordinate should be a value type, not passed by reference
- Closed