summaryrefslogtreecommitdiff
path: root/tests/auto/qml/data/property.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/data/property.html')
-rw-r--r--tests/auto/qml/data/property.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qml/data/property.html b/tests/auto/qml/data/property.html
new file mode 100644
index 0000000..9565aaa
--- /dev/null
+++ b/tests/auto/qml/data/property.html
@@ -0,0 +1,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>