diff options
Diffstat (limited to 'tests/auto/qml/data/property.html')
-rw-r--r-- | tests/auto/qml/data/property.html | 21 |
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> |