blob: 38c42ddd6612d9cff7d22668a1b6c9572d714970 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import Qt 4.6
import org.webkit 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"
javaScriptWindowObjects: QtObject {
id: js
WebView.windowObjectName: "qml"
property real lat: page.latitude
property real lng: page.longitude
property string address: page.address
property string status: "Loading"
onAddressChanged: { if (map.url != "" && map.progress==1) map.evaluateJavaScript("goToAddress()") }
}
pressGrabTime: 0
onLoadFinished: { evaluateJavaScript("goToAddress()"); }
}
}
|