Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Progress bar for event with unknown duration (PySide)

Tags:

python

qt

pyside

I have a GUI developed using PySide. I have a long operation to perform from the interface, but there is no way to predict how long the operation will be. I'd like to display something to the user to tell him: the operation is in progress, please wait. Something like an infinite progress bar, or a spinning wheel. Is there a widget for such operation in Qt? I found the QProgressDialog (and QProgressBar), but it's not appropriate since I cannot predict the amount of work to perform.

like image 683
Charles Brunet Avatar asked Oct 30 '25 20:10

Charles Brunet


1 Answers

Finally, I found the answer in QProgressBar documentation:

If minimum and maximum both are set to 0, the bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using PySide.QtNetwork.QFtp or PySide.QtNetwork.QNetworkAccessManager to download items when they are unable to determine the size of the item being downloaded.

like image 73
Charles Brunet Avatar answered Nov 02 '25 08:11

Charles Brunet