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