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.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/declarative/webview/content/Mapping/Map.qml b/examples/declarative/webview/content/Mapping/Map.qml
index 6c3b021..38c42dd 100644
--- a/examples/declarative/webview/content/Mapping/Map.qml
+++ b/examples/declarative/webview/content/Mapping/Map.qml
@@ -6,16 +6,21 @@ Item {
property real latitude: -34.397
property real longitude: 150.644
property string address: ""
+ property alias status: js.status
WebView {
id: map
anchors.fill: parent
url: "map.html"
javaScriptWindowObjects: QtObject {
+ id: js
WebView.windowObjectName: "qml"
property real lat: page.latitude
property real lng: page.longitude
property string address: page.address
- onAddressChanged: {map.evaluateJavaScript("goToAddress()")}
+ property string status: "Loading"
+ onAddressChanged: { if (map.url != "" && map.progress==1) map.evaluateJavaScript("goToAddress()") }
}
+ pressGrabTime: 0
+ onLoadFinished: { evaluateJavaScript("goToAddress()"); }
}
}