views:

163

answers:

2
A: 

From the Qt Doc:

Warning: done and total are not necessarily the size in bytes, since for large files these values might need to be "scaled" to avoid overflow.

See also dataReadProgress(), post(), request(), and QProgressBar.

So in case done is (for example) in Bytes (say 10 B) and total in kBytes (say 7 kB) then total < done and therefore the progressBar goes to 100%

penguinpower
actually I printed out both of the values when the signal was emitted, and the reason it jumped to 100% was that both of the values (done/total) were the same (like 13340/13340) at the beginning of the upload process already
rolanddd
+1  A: 

It looks like you are using QHttp and not QNetworkAccessManager. QHttp is deprecated and has bugs related to the progress signals.

Please look into using http://qt.nokia.com/doc/4.7-snapshot/qnetworkreply.html#downloadProgress and http://qt.nokia.com/doc/4.7-snapshot/qnetworkreply.html#uploadProgress

guruz