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