Invece di connettere il manager, connetti la singola risposta cosi' puoi gestire anche il segnale error() che ti permette di catturare la fattispecie che ti interessa
manager = new QNetworkAccessManager(); manager->setProxy(QNetworkProxy::NoProxy); connect(manager,&QNetworkAccessManager::finished,this,&alfro::managerFinished); connect(manager,&QNetworkAccessManager::sslErrors,this,&alfro::ignorsa); QSslConfiguration cfg(QSslConfiguration::defaultConfiguration()); cfg.setProtocol(QSsl::AnyProtocol); request.setSslConfiguration(cfg); request.setUrl(url); QNetworkReply* reply = manager->get(request); // signature alfro::managerFinished(QNetworkReply*) connect(reply,&QNetworkReply::finished,this,std::bind(&alfro::managerFinished,this,reply)); // signature alfro::ignorsa(QNetworkReply*,const QList<QSslError>&) connect(reply,&QNetworkReply::sslErrors,this,std::bind(&alfro::ignorsa,this,reply, std::placeholders::_1)); // signature alfro::manageErrors(QNetworkReply*,QNetworkReply::NetworkError) connect(reply,&QNetworkReply::error,this,std::bind(&alfro::manageErrors,this,reply, std::placeholders::_1));Italian
A forum for those speaking Italian
459
Topics
1.9k
Posts
-
Problemi con SSL e richieste HTTPS
Unsolved -
-
-
Collegamento a database .sdb da link
Unsolved -
-
-
-
-
Centrare testo su QTableWidgetItem
Unsolved -
-
Chiarimento Tutorial
Solved -
Utilizzare dll nel progetto
Unsolved -
Frame come html
Solved -
-
Flickable zone
Unsolved -
Settaggio compilatori
Solved -
-
Connessioni a run-time
Solved -
Problema strano connessione SQL
Unsolved -