How can i get the google map to fill the webview? im using Qt Creator for symbian. like get the webviews size or is there a option to autosize its contents?
How can i get the google map to fill the webview? im using Qt Creator for symbian. like get the webviews size or is there a option to autosize its contents?
I would simply calculate the webview dimensions(widthxheight) & pass those in the url for fetching google map of desired size.
can u tell me how would I get its widthxHeight? or if there is a example somewhere?
Well you can pass the same width & height which you gave while constructing the webview.For e.g:
take the above width & height in some variable & pass it to the google maps url.Code:WebView { id: mapView url: some url preferredWidth: parent.width preferredHeight: parent.height scale: 1 smooth: false }
Mine auto sizes the app through design view, is there a way to fined the w&h another way perhaps?
Hi,
You can pass the values to QML from c++ look the following:
Obtaining a Desktop Widget
The QApplication::desktop() function is used to get an instance of QDesktopWidget.
The widget’s screenGeometry() function provides information about the geometry of the available screens with. The obtained values you can pass to parent rectangle containing the Webview element.
Rectangle {
width:/*from c++*/
height: /*from c++*/
WebView {
id: mapView
url: some url
preferredWidth: parent.width
preferredHeight: parent.height
scale: 1
smooth: false
}
}