aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlconnections/data/functions/singletontype-target.qml
blob: 935b610351a939c5bcc7a3141cedc1c2247d4103 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import QtQml 2.0
import MyTestSingletonType 1.0 as MyTestSingletonType

QtObject {
    id: rootObject
    objectName: "rootObject"
    property int newIntPropValue: 12

    property int moduleIntPropChangedCount: 0
    property int moduleOtherSignalCount: 0

    function setModuleIntProp() {
        MyTestSingletonType.Api.intProp = newIntPropValue;
        newIntPropValue = newIntPropValue + 1;
    }

    property Connections c: Connections {
        target: MyTestSingletonType.Api
        function onIntPropChanged() { moduleIntPropChangedCount = moduleIntPropChangedCount + 1 }
        function onOtherSignal() { moduleOtherSignalCount = moduleOtherSignalCount + 1 }
    }
}