From b3a569ed57eecccd34ef3c9071e73847f6479112 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 16 Aug 2017 13:20:29 +1000 Subject: [PATCH] progress dialog tweaks - don't use mw as parent if it's not visible - wider --- aqt/progress.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aqt/progress.py b/aqt/progress.py index 6c10984e5..07d137700 100644 --- a/aqt/progress.py +++ b/aqt/progress.py @@ -98,7 +98,10 @@ class ProgressManager: if self._levels > 1: return # setup window - parent = parent or self.app.activeWindow() or self.mw + parent = parent or self.app.activeWindow() + if not parent and self.mw.isVisible(): + parent = self.mw + label = label or _("Processing...") if cancellable: klass = self.ProgressCancellable @@ -110,6 +113,7 @@ class ProgressManager: self._win.setAutoClose(False) self._win.setAutoReset(False) self._win.setWindowModality(Qt.ApplicationModal) + self._win.setMinimumWidth(300) # we need to manually manage minimum time to show, as qt gets confused # by the db handler self._win.setMinimumDuration(100000)