August 11, 2011

umen242 umen242
Lab Rat
198 posts

What is the best way to show in progress bar the progress of file upload?


I need to visualize in progress bar the status of file being uploaded to server .
How do I do the calculations on this ?

3 replies

August 11, 2011

peppe peppe
Ant Farmer
1005 posts

What do you mean? What are you using for upload?


Software Engineer
KDAB (UK) Ltd., a KDAB Group company

August 15, 2011

Volker Volker
Ant Farmer
5331 posts

It depends on the classes you use for uploading your data. You might want to look into the QNetworkReply::uploadProgress() [] signal and connect it to the progressbar.

March 21, 2012

Jeroentje@home Jeroentje@ho..
Robot Herder
949 posts

If you use a file you might want to use this:
sendProgress->setValue( (fileToSend->pos() * 100) / fileToSend->size());
The pos() functions comes from the QIODevice class, but it is inherited by QFile.


Greetz, Jeroen

  ‹‹ Qt3D and QGeometryData      Qt3D and QGlSceneNode ››

You must log in to post a reply. Not a member yet? Register here!