summaryrefslogtreecommitdiffstats
path: root/examples/declarative/webview/content/Mapping/Map.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/webview/content/Mapping/Map.qml')
-rw-r--r--examples/declarative/webview/content/Mapping/Map.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/declarative/webview/content/Mapping/Map.qml b/examples/declarative/webview/content/Mapping/Map.qml
new file mode 100644
index 0000000..aae6b5d
--- /dev/null
+++ b/examples/declarative/webview/content/Mapping/Map.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Item {
+ id: page
+ property real latitude: -34.397
+ property real longitude: 150.644
+ property string address: ""
+ WebView {
+ id: map
+ anchors.fill: parent
+ url: "map.html"
+ javaScriptWindowObjects: QtObject {
+ WebView.windowObjectName: "qml"
+ property real lat: page.latitude
+ property real lng: page.longitude
+ property string address: page.address
+ onAddressChanged: {map.evaluateJavaScript("goToAddress()")}
+ }
+ }
+}