Momergil
7th March 2012, 18:35
Hello!
I need to implement a QProgressDialog to show the download from the web, and for that I'm using QNetworkAcessManager + QNetworkReply.
The problem is that as far as I know, in order for the QProgressDialog to work properly, I need to set the minimum and maximum value, i.e. 0 bytes and the size of the file I'll be downloading, which is not predefined. I tried to find functions in the network classes that could show me the size of the file I'm downloading before start it, but I didn't, and despite I can use the value shown in the signal downloadProgress(qint64,qint64), I don't want to use this way (i.e. I want to start the progress dialog already with the maxium value set). Given the fact that the signal shows the size of the file, how can I find that information?
Obs.: I'm downloading the file from a url.
Thanks,
Momergil
I need to implement a QProgressDialog to show the download from the web, and for that I'm using QNetworkAcessManager + QNetworkReply.
The problem is that as far as I know, in order for the QProgressDialog to work properly, I need to set the minimum and maximum value, i.e. 0 bytes and the size of the file I'll be downloading, which is not predefined. I tried to find functions in the network classes that could show me the size of the file I'm downloading before start it, but I didn't, and despite I can use the value shown in the signal downloadProgress(qint64,qint64), I don't want to use this way (i.e. I want to start the progress dialog already with the maxium value set). Given the fact that the signal shows the size of the file, how can I find that information?
Obs.: I'm downloading the file from a url.
Thanks,
Momergil