ich möchte gerne meine Qt Applikation automatisch eine HTML Seite herunterladen lassen, um darin etwas nachzuschlagen. Dazu lege ich folgendes an:
Code: Alles auswählen
QNetworkAccessManager acsman(this);
reply = acsman.get(QNetworkRequest(url));
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(httpError(QNetworkReply::NetworkError)));
connect(reply, SIGNAL(finished()), this, SLOT(httpFinished()));
connect(reply, SIGNAL(readyRead()), this, SLOT(httpReadyRead()));
connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(updateDataReadProgress(qint64,qint64)));
if(reply->isRunning())
std::cout << "I'm running..." << std::endl;
else
std::cout << "I'm dead..." << std::endl;
Danke und Grüße