summaryrefslogtreecommitdiff
path: root/examples/qtobject/qml/qtobject/index.html
blob: d79fd7ebec5060b905e4c1b2dd72c29b331f0ba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
    <head>
        <script>
            document.write('<script src="' + (/[?&]webChannelBaseUrl=([A-Za-z0-9\-:/]+)/.exec(location.search)[1]) + '/webchannel.js/createWebChannel"><' + '/script>');
            window.output = function(x)
            {
                document.querySelector("#out").innerHTML += x + "\n";
            }
        </script>
        <script src="qtobject.js"></script>
        <script>
        </script>
    </head>
    <body>
        <a href="#" onclick="testObject.debugMe('Debugging!', function(result) { output(result); })">invoke method</a>
        <a href="#" onclick="testObject.prop1(function(value) { output(value); })">Get property</a>
        <a href="#" onclick="testObject.prop1 = 'Different property'; testObject.prop1(function(value) { output(value); })">Set property</a>
        <a href="#" onclick="testObject.timeout.connect(function() { output('timeout'); }); testObject.startTimer(1000);">Timer</a>
        <br/>
        <textarea id="out" style="height:80%; width: 80%"></textarea>
    </body>
</html>