As Frank wrote in his comet, the get function is asynchronous, so when you try to read the response, the HTTP request is not yet complete.
To solve this problem, you need to process the finished signal:
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
and read the results in the handler:
void NetworkHandler::replyFinished(QNetworkReply *reply) { qDebug() << reply->readAll(); }
source share