--- a/examples/declarative/modelviews/webview/content/Mapping/Map.qml Tue Jul 06 15:10:48 2010 +0300
+++ b/examples/declarative/modelviews/webview/content/Mapping/Map.qml Wed Aug 18 10:37:55 2010 +0300
@@ -39,18 +39,21 @@
****************************************************************************/
import Qt 4.7
-import org.webkit 1.0
+import QtWebKit 1.0
Item {
id: page
+
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"
+ pressGrabTime: 0
javaScriptWindowObjects: QtObject {
id: js
WebView.windowObjectName: "qml"
@@ -58,9 +61,13 @@
property real lng: page.longitude
property string address: page.address
property string status: "Loading"
- onAddressChanged: { if (map.url != "" && map.progress==1) map.evaluateJavaScript("goToAddress()") }
+
+ onAddressChanged: {
+ if (map.url != "" && map.progress == 1)
+ map.evaluateJavaScript("goToAddress()")
+ }
}
- pressGrabTime: 0
+
onLoadFinished: { evaluateJavaScript("goToAddress()"); }
}
}