Question

I've got a problem showing www.facebook.com in Qt5 QML QWebKit 3.0.

The problem is with SSL certificate. There is a solution for Qt 4.*, but I need to implement this in the Qt 5.0.1 where all the API had changed.

The example solution for Qt 4.* could be found here link

Was it helpful?

Solution

Here is the solution, how you could ignore SSL errors from QML in Qt5. It helped me to show facebook page. I'm to use experimental API. The solution is correct for Qt 5.0.1 msvc2010 version in Windows 7 64bit.

import QtWebKit 3.0
import QtWebKit.experimental 1.0

WebView {
    id: webView;
    url: "https://www.facebook.com";
    experimental.certificateVerificationDialog: Item {
        Component.onCompleted: {
            model.accept();
        }
    }
}

OTHER TIPS

I was not able to resolve this problem with Qt 5.1 and MinGW4.8 using the experimental feature.

Finally I installed the new Qt 5.2 release that has a more expressive error message:

QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function ERR_get_error

So with this new information the solution was installing Win32OpenSSL: http://slproweb.com/products/Win32OpenSSL.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top