Setting a QProgressBar (or QProgressDialog) to be indeterminate by setting the minimum and maximum range to be zero does not work when the bar is drawn with QWindowsVistaStyle. It works fine in the other styles I've tried. See the attached test case 'indeterminate-progress-bar-test.zip'.
The bug is in QWindowsVistaStyle::drawControl. It requires that the progress bar's current value is strictly less than the maximum before it will set up the animation, but this can't be true for indeterminate progress bars where the maximum has to be zero. I've attached a simple patch that fixes the bug.