Use V4 binding for non-final properties where possible
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlecmascript / data / dynamicDeletion.3.qml
1 import QtQuick 2.0
2 import Qt.test 1.0
3
4 Item {
5     id: root
6     property bool test: false
7     property QtObject objectProperty
8
9     onObjectPropertyChanged: {
10         root.test = true;
11     }
12
13     property Component c: Component {
14         id: dynamicComponent
15         QtObject {
16             id: dynamicObject
17         }
18     }
19
20     function create() {
21         root.objectProperty = root.c.createObject(root);
22     }
23
24     function destroy() {
25         root.test = false; // reset test
26         root.objectProperty.destroy(100);
27         // in cpp, wait objectProperty deletion, inspect "test" and "objectProperty"
28         // test should be true and value of objectProperty should be zero.
29     }
30 }