summaryrefslogtreecommitdiff
path: root/tests/auto/qml/data/wrapper.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/data/wrapper.html')
-rw-r--r--tests/auto/qml/data/wrapper.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/qml/data/wrapper.html b/tests/auto/qml/data/wrapper.html
new file mode 100644
index 0000000..a556486
--- /dev/null
+++ b/tests/auto/qml/data/wrapper.html
@@ -0,0 +1,28 @@
+<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) {
+ myFactory.create("testObj", function(obj) {
+ window[obj.objectName()] = obj;
+ obj.mySignal.connect(function(arg1, arg2) {
+ channel.exec({label: "signalReceived", args: [arg1, arg2]});
+ });
+ obj.myProperty = 42;
+ obj.myMethod("foobar");
+ });
+ channel.subscribe("triggerDelete", function() {
+ testObj.deleteLater();
+ });
+ channel.subscribe("report", function() {
+ channel.exec({label:"report", obj: testObj})
+ });
+ });
+ //END SETUP
+ </script>
+ </head>
+ <body>
+ </body>
+</html>