summaryrefslogtreecommitdiff
path: root/tests/auto/qml/data/property.html
blob: 49b38111e19d6051d6b250a9535706eecd0556ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<html>
    <head>
        <script type="text/javascript" src="qrc:///qwebchannel/qwebchannel.js"></script>
        <script type="text/javascript" src="testsetup.js"></script>
        <script type="text/javascript">
            //BEGIN SETUP
            createWebChannel(function(channel) {
                channel.exec({label: "init", value: myObj.myProperty});
                myObj.myPropertyChanged.connect(function() {
                    channel.exec({label: "changed", value: myObj.myProperty});
                });
                channel.subscribe("setProperty", function(newValue) {
                    myObj.myProperty = newValue;
                });
            });
            //END SETUP
        </script>
    </head>
    <body>
    </body>
</html>