История изменений
Исправление UVV, (текущая версия) :
По твоей же ссылке:
QProgressDialog is designed to show itself automatically, based on an internal estimate for the duration of the operation and the minimumDuration property. You never call show() or exec() on it manually. You're also not supposed to keep it around when it's not used. In 5.4, the only way to start the internal duration estimation was to call setValue(0). But we noticed that many people didn't call setValue(0), but just handed external progress information on to the progress dialog, and whether or not that progress information started at 0 or, say, 1, would determine whether the dialog would show itself at all, or not. This was thought to be a bit fragile, so we changed it so that the start time of the duration estimate was the dialog construction time unless setValue(0) (or, more correctly, setValue(minimum()) was called, leading to the dialog showing itself minimumDuration after its construction, even if it was constructed not for immediate use (which the dialog cannot distinguish from a really long-running operation).
Thanks, now I understand the idea! So basically, if one does not need such complicated functionality, one is better off designing their own primitive dialog with a progress bar instead of using QProgressDialog.
Исходная версия UVV, :
По твоей же ссылке:
QProgressDialog is designed to show itself automatically, based on an internal estimate for the duration of the operation and the minimumDuration property. You never call show() or exec() on it manually. You're also not supposed to keep it around when it's not used. In 5.4, the only way to start the internal duration estimation was to call setValue(0). But we noticed that many people didn't call setValue(0), but just handed external progress information on to the progress dialog, and whether or not that progress information started at 0 or, say, 1, would determine whether the dialog would show itself at all, or not. This was thought to be a bit fragile, so we changed it so that the start time of the duration estimate was the dialog construction time unless setValue(0) (or, more correctly, setValue(minimum()) was called, leading to the dialog showing itself minimumDuration after its construction, even if it was constructed not for immediate use (which the dialog cannot distinguish from a really long-running operation).
Thanks, now I understand the idea! So basically, if one does not need such complicated functionality, one is better off designing their own primitive dialog with a progress bar instead of using QProgressDialog.