Decrease minimum QProgressDialog duration
We already have a threshold before we use a QProgressDialog at all, so let's show it quite quickly and not after 4 seconds.
This commit is contained in:
parent
935d93d10e
commit
ab6c8dde9a
@ -52,6 +52,7 @@ class HistoryProgress:
|
|||||||
|
|
||||||
def start(self, text, maximum):
|
def start(self, text, maximum):
|
||||||
self._progress = QProgressDialog()
|
self._progress = QProgressDialog()
|
||||||
|
self._progress.setMinimumDuration(500)
|
||||||
self._progress.setLabelText(text)
|
self._progress.setLabelText(text)
|
||||||
self._progress.setMaximum(maximum)
|
self._progress.setMaximum(maximum)
|
||||||
self._progress.setCancelButton(None)
|
self._progress.setCancelButton(None)
|
||||||
|
@ -494,6 +494,7 @@ class TestHistoryProgress:
|
|||||||
assert dialog.minimum() == 0
|
assert dialog.minimum() == 0
|
||||||
assert dialog.maximum() == 42
|
assert dialog.maximum() == 42
|
||||||
assert dialog.value() == 1
|
assert dialog.value() == 1
|
||||||
|
assert dialog.minimumDuration() == 500
|
||||||
|
|
||||||
progress.finish()
|
progress.finish()
|
||||||
assert not dialog.isVisible()
|
assert not dialog.isVisible()
|
||||||
|
Loading…
Reference in New Issue
Block a user