Ticket #735: test.html

File test.html, 634 bytes (added by Conrad Huang, 8 years ago)
Line 
1<html>
2<head>
3<meta charset="UTF-8">
4<script type="text/javascript" src="qrc:///qtwebchannel/qwebchannel.js"></script>
5<script type="text/javascript">
6window.onload = function() {
7 if (typeof QWebChannel != "undefined") {
8 console.log("QWebChannel " + QWebChannel);
9 new QWebChannel(qt.webChannelTransport, function(channel) {
10 window.wc = channel.objects.dialog;
11 window.wc.receiveText("Hello world");
12 })
13 } else {
14 console.log("QWebChannel is undefined");
15 window.wc = null;
16 }
17}
18</script>
19</head>
20<body>
21<h1>Hello world</h2>
22</body>
23</html>