aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/propertyVar.1.qml
blob: 219e61bf91ed8911655dec430bd1ac8be67b821f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import QtQuick 2.0

Item {
    id: root
    property bool test: false

    property var car: new vehicle(4);
    property int wheelCount: car.wheels

    function vehicle(wheels) {
        this.wheels = wheels;
    }

    Component.onCompleted: {
        car.wheels = 6;  // not bindable, wheelCount shouldn't update

        if (car.wheels != 6) return;
        if (wheelCount != 4) return;

        test = true;
    }
}