Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
What is the best way to show in progress bar the progress of file upload?
umen242 last edited by
I need to visualize in progress bar the status of file being uploaded to server .
How do I do the calculations on this ?
dangelog last edited by
What do you mean? What are you using for upload?
goetz last edited by
It depends on the classes you use for uploading your data. You might want to look into the "QNetworkReply::uploadProgress() ":http://doc.qt.nokia.com/4.7/qnetworkreply.html#uploadProgress signal and connect it to the progressbar.
Jeroentjehome last edited by
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.