diff --git a/qt/aqt/progress.py b/qt/aqt/progress.py index 261441a51..93fa712d7 100644 --- a/qt/aqt/progress.py +++ b/qt/aqt/progress.py @@ -206,7 +206,7 @@ class ProgressManager: maybeShow: bool = True, max: int | None = None, ) -> None: - # print self._min, self._counter, self._max, label, time.monotonic() - self._lastTime + # print("update", label, self._levels, self._min, self._counter, self._max, label, time.monotonic() - self._shown) if not self.mw.inMainThread(): print("progress.update() called on wrong thread") return diff --git a/qt/aqt/sync.py b/qt/aqt/sync.py index 36e1d5a19..861c632f5 100644 --- a/qt/aqt/sync.py +++ b/qt/aqt/sync.py @@ -161,6 +161,7 @@ def full_sync( callback=callback, buttons=button_labels, default_button=2, + parent=mw, ) diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py index cf5702c28..d89c9fbf6 100644 --- a/qt/aqt/utils.py +++ b/qt/aqt/utils.py @@ -208,6 +208,7 @@ def ask_user_dialog( | None ) = None, default_button: int = 1, + parent: QWidget | None = None, **kwargs: Any, ) -> MessageBox: "Shows a question to the user, passes the index of the button clicked to the callback." @@ -219,6 +220,7 @@ def ask_user_dialog( icon=QMessageBox.Icon.Question, buttons=buttons, default_button=default_button, + parent=parent, **kwargs, )