QNetworkReply *networkReply; QNetworkRequest networkRequest; QNetworkAccessManager *networkManager = new QNetworkAccessManager(this); QNetworkCookieJar *cookieJar = new QNetworkCookieJar(this); networkManager->setCookieJar(cookieJar); networkRequest.setRawHeader("User-Agent","Opera/9.80 (Windows NT 6.1) Presto/2.12.388 Version/12.17"); // запрос 1 networkRequest.setRawHeader("Content-Type","application/x-www-form-urlencoded"); networkRequest.setUrl(QUrl("http://site.com")); networkReply = networkManager->get(networkRequest); connect(networkManager, SIGNAL(finished(QNetworkReply*)), &eLoop, SLOT(quit())); QTimer::singleShot(10000, &eLoop, SLOT(quit())); eLoop.exec(); if(networkReply->error()!=QNetworkReply::NoError) { QMessageBox::information(this,0,"ERROR: "+networkReply->errorString(),0,0); } data = networkReply->readAll(); networkReply->close(); // запрос 2 networkRequest.setUrl(QUrl("http://site.com/page1.html")); networkReply = networkManager->get(networkRequest); connect(networkManager, SIGNAL(finished(QNetworkReply*)), &eLoop, SLOT(quit())); QTimer::singleShot(10000, &eLoop, SLOT(quit())); eLoop.exec(); if(networkReply->error()!=QNetworkReply::NoError) { QMessageBox::information(this,0,"ERROR: "+networkReply->errorString(),0,0); } data = networkReply->readAll(); networkReply->close(); delete(cookieJar); delete(networkManager);