Hi,
I have the following code piece;
currentReply
= nam
->get
(QNetworkRequest
(QUrl(s
)));
connect(currentReply, SIGNAL(downloadProgress(qint64,qint64)), this,
SLOT(onDownloadProgress(qint64,qint64)));
currentReply = nam->get(QNetworkRequest(QUrl(s)));
connect(currentReply, SIGNAL(downloadProgress(qint64,qint64)), this,
SLOT(onDownloadProgress(qint64,qint64)));
To copy to clipboard, switch view to plain text mode
and in onDownloadProgress
void SNGWManager::onDownloadProgress(qint64 p_BytesReceived,qint64 p_BytesTotal)
{
if(p_BytesReceived == p_BytesTotal)
{
if(currentReply)
{
// Pixmap loading here
}
...
}
}
void SNGWManager::onDownloadProgress(qint64 p_BytesReceived,qint64 p_BytesTotal)
{
if(p_BytesReceived == p_BytesTotal)
{
if(currentReply)
{
// Pixmap loading here
}
...
}
}
To copy to clipboard, switch view to plain text mode
I suppose that reads all the data in the reply. If doesn't, QFile wouldn't work already?
Bookmarks