aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/propertyQJSValue.14.qml
blob: 1c1c038d4c0a96cf05a626f1c0e27742be2e35e2 (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
import Qt.test 1.0

MyQmlObject {
    property bool test: false
    property int a: 100
    property int b

    function testFunction() {
        return a * 3;
    }

    Component.onCompleted: {
        b = Qt.binding(testFunction);
        qjsvalue = Qt.binding(function() { return b + 12; });
        if (qjsvalue != 312) return;
        a = 120;
        if (qjsvalue != 372) return;
        test = true;
    }
}