0

I am trying to handle sslErrors in custom class WebPage inherited from QWebPage.

WebPage::WebPage()
{
    connect(
        networkAccessManager(),
        SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError> & )),
        this,
        SLOT(handleSslErrors(QNetworkReply*, const QList<QSslError> & )));
}

But have a runtime error:

QObject::connect: No such signal QNetworkAccessManager::sslErrors(QNetworkReply*, const QList<QSslError> & )

How can I fix this?

2
  • Was your Qt compiled with SSL support ? Jan 9, 2015 at 13:43
  • No, after recompiling it works perfectly. Thanks a lot!
    – Vladimir
    Jan 10, 2015 at 12:40

2 Answers 2

0

Try this (modificators like const and reference & should be omitted):

WebPage::WebPage()
{
    connect(
        networkAccessManager(),
        SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
        this,
        SLOT(handleSslErrors(QNetworkReply*,QList<QSslError>)));
}

If you are using Qt Creator it should help you properly autocomplete this.

0

The solution is to recompile Qt with SSL support, in my case using OpenSSL:

configure -developer-build -opensource -nomake examples -nomake tests -icu -I C:\ICU\include -L C:\ICU\lib -openssl -I C:\openssl\include -L C:\openssl\lib

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.