这是我曾经这样做的代码,但我不知道如何完成:S
void MainWindow::on_pushButton_clicked()
{
manager = new QNetworkAccessManager(this);
QNetworkRequest request;
request.setUrl(QUrl("http://zwjte.com/s/media/images/35ea10fc43.jpg"));
reply = manager->get(request);
connect(reply, SIGNAL(readyRead()), this, SLOT(ReadyRead()));
}
void MainWindow::ReadyRead()
{
QByteArray bytes(reply->readAll());
//??????????????????
}