Use V4 binding for non-final properties where possible
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlecmascript / data / propertyQJSValue.2.qml
1 import QtQuick 2.0
2 import Qt.test 1.0
3
4 MyQmlObject {
5     id: root
6     property bool test: false
7
8     qjsvalue: new vehicle(8);
9     property int wheelCount: qjsvalue.wheels
10
11     function vehicle(wheels) {
12         this.wheels = wheels;
13     }
14
15     Component.onCompleted: {
16         if (wheelCount != 8) return;
17
18         // not bindable, but wheelCount will update because truck itself changed.
19         qjsvalue = new vehicle(12);
20
21         if (wheelCount != 12) return;
22
23         test = true;
24     }
25 }