I just picked up Qt and QML for the first time and the first thing I wanted to get working was just to open Google Maps in a WebView but it doesn’t work.
Here’s the QML:
import QtQuick 2.0
import QtWebKit 3.0
Rectangle {
width: 1024
height: 960
WebView {
width: 1024
height: 960
anchors.centerIn: parent
url: "http://maps.google.com"
}
}
The window opens but the contents of the WebView are completely blank. If I try other websites then the correct web page is displayed.
What’s wrong with this code? I am not behind any proxy or firewall. I suspect it is something to do with HTTPS given that some maps APIs use HTTPS but I don’t see why HTTP would work but not HTTPS.
I am using Qt 5.1 on Windows 7 64-bit.
↧