刚学qt,用qt creator,linux平台
以下是网上找的代码,但没有实现。
QUrl *url=new QUrl("http://www.baidu.com");
QHttp *http = new QHttp(this);
http->setHost(url->host());
QBuffer *buffer;
buffer = new QBuffer(this);
http->get(url->toString(), buffer);
QMessageBox::information(this, "http", QString(buffer->data()));