hi friends i have to make an Network Request (get or post) . the url is as follows
http://maps.google.com/maps/geo?q=hanifa&output=csv
if u copy the url and paste it in the browser, you get an reply .... now my goal is to get the same reply from an Qt application . i wrote the following coding
but i am not getting the correct response. Any one who has Networking knowledge please try it, say where i am wrong and post the corrected code please
void MainWindow:n_pushButton_clicked()
{
QNetworkAccessManager *nam = new QNetworkAccessManager(this);
connect(nam,SIGNAL(finished(QNetworkReply*)),this,SLOT(replyFinished(QNetworkReply*)));
QNetworkReply *reply = nam->get(QNetworkRequest(QUrl("http://maps.google.com/maps/geo?q=hanifa&output=csv")));
ui->textEdit->setText(reply->readAll());
qDebug()<<reply->readAll();
}
void MainWindow::replyFinished(QNetworkReply *reply)
{
QString data = reply->readAll();
qDebug()<<data;
}

n_pushButton_clicked()
Reply With Quote

