diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-23 02:04:41 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-23 02:04:41 (GMT) |
commit | 9a41034cf05ad4c149e3a98dc8e39f5f6ad05d28 (patch) | |
tree | 1e1fb615c64666eb08d1a93c99f7fe80808958bc /examples/declarative/webview/content/Mapping/Map.qml | |
parent | c3d8fef05b011a737ce15791e94aef84d27d1b8f (diff) | |
download | Qt-9a41034cf05ad4c149e3a98dc8e39f5f6ad05d28.zip Qt-9a41034cf05ad4c149e3a98dc8e39f5f6ad05d28.tar.gz Qt-9a41034cf05ad4c149e3a98dc8e39f5f6ad05d28.tar.bz2 |
Show loading progress
Task-number: QTBUG-9260
Diffstat (limited to 'examples/declarative/webview/content/Mapping/Map.qml')
-rw-r--r-- | examples/declarative/webview/content/Mapping/Map.qml | 7 |
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()"); } } } |