[Interest] FW: Issues with HTTPS, Google Maps, SSL, proxy & Qt 5.1

John C. Turnbull ozemale at ozemail.com.au
Sat Jul 20 07:09:17 CEST 2013


Has anyone actually managed to get Google Maps to display in a WebView?  If
so, could you please describe what needs to be done to get it to work?  My
attempts are failing miserably :(

 

Thanks,

 

-jct

 

From: John C. Turnbull [mailto:ozemale at ozemail.com.au] 
Sent: Friday, 19 July 2013 23:07
To: 'interest at qt-project.org'
Subject: Issues with HTTPS, Google Maps, SSL, proxy & Qt 5.1

 

My very first attempt at getting something up and running with Qt involved
trying to display Google Maps in a WebView with Qt 5.1 but it doesn't work.

 

The web browser component opens up but displays nothing.  It seems to be an
issue with HTTPS.

 

One suggestion was to try installing OpenSSL and then link the library to my
project but it still fails trying to use HTTPS with this error:

 

Unable to init SSL Context:

 

How can I get it to work?

 

My QML looks like this:

 

import QtQuick 2.0

import QtWebKit 3.0

 

WebView {

    width: 1024

    height:960

    url: "http://maps.google.com"

 

    Component.onCompleted: {

        onLoadingChanged.connect(report)

    }

 

    function report(loadRequest) {

        console.log(loadRequest.errorString)

    }

}

 

Also, on my machine (now) I am not using any proxy but I couldn't get it to
work on another machine that is using a proxy.

 

For that machine I tried something like this:

 

    QNetworkProxy proxy;

    proxy.setType(QNetworkProxy::Socks5Proxy);

    proxy.setType(QNetworkProxy::HttpProxy);

    proxy.setHostName("proxy.example.com");

    proxy.setPort(1080);

    QNetworkProxy::setApplicationProxy(proxy);

 

But I cannot see how to set proxy settings for HTTPS as HttpProxy is the
only type available.

 

How can I configure application-wide proxy settings for HTTPS?

 

Thanks,

 

-jct

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130720/23818391/attachment.html>


More information about the Interest mailing list