April 2018
Beginner
714 pages
18h 21m
English
Especially when a big file is downloaded, the user usually wants to know how much data has already been downloaded and approximately how long it will take for the download to finish.
In order to achieve this, we can use the reply's downloadProgress() signal. As the first argument, it passes the information on how many bytes have already been received and as the second argument, how many bytes there are in total. This gives us the possibility to indicate the progress of the download with QProgressBar. As the passed arguments are of the qint64 type, we can't use them directly with QProgressBar, as it only accepts int. So, in the connected slot, we can do the following:
void SomeClass::downloadProgress(qint64 ...
Read now
Unlock full access