you do not upload the data, so you'll never get the signal finished().
You must add something like:
connect( mpReply, SIGNAL( readyRead() ), SLOT( downloadReadyRead() )); // trigger data download
mpReply = manager.get( request );
...
void qmlinterface::downloadReadyRead()
{
mBuffer += mpReply->readAll);
//qDebug() << "mpBuffer size =" << mpBuffer->size();
}
connect( mpReply, SIGNAL( readyRead() ), SLOT( downloadReadyRead() )); // trigger data download
mpReply = manager.get( request );
...
void qmlinterface::downloadReadyRead()
{
mBuffer += mpReply->readAll);
//qDebug() << "mpBuffer size =" << mpBuffer->size();
}
To copy to clipboard, switch view to plain text mode
in class declaration add:
private slots:
void downloadReadyRead();
private:
QNetworkReply* mpReply;
private slots:
void downloadReadyRead();
private:
QNetworkReply* mpReply;
QByteArray mBuffer
To copy to clipboard, switch view to plain text mode
Notice that this approach would probably not work correctly if you are sending several requests.
You should use then a queue to store the requests and working down the queue one after the other.
Bookmarks