I have a simple loop where I'm performing an indeterminate-length operation. I set up a QProgressDialog with range(0,0)
to trigger its indeterminate "busy" mode; on my platform, this normally produces a progress bar whose handle bounces back and forth. Even stripped down to the following, though, the dialog appears, responds to the "Cancel" button, but the handle is frozen in place at the end of the bar and doesn't cycle.
QProgressDialog* progressDialog =
new QProgressDialog("My Progress", "Cancel",
0, 0, this);
progressDialog->setAttribute(Qt::WA_DeleteOnClose, true);
progressDialog->setModal(true);
progressDialog->setMinimumDuration(0);
progressDialog->show();
progressDialog->setValue(0);
while (!done)
{
QThread::msleep(200);
QCoreApplication::processEvents();
}
Obviously there's more actually going on inside the loop, but it behaves the same with or without the content; what's left above after commenting out everything else behaves as described.
Why isn't my progress handle bouncing back and forth?