diff --git a/pyface/ui/qt/progress_dialog.py b/pyface/ui/qt/progress_dialog.py index e0c3e6b42..ba1b1d83a 100644 --- a/pyface/ui/qt/progress_dialog.py +++ b/pyface/ui/qt/progress_dialog.py @@ -170,7 +170,7 @@ def update(self, value): # Private Interface # ------------------------------------------------------------------------- - def reject(self, event): + def reject(self, event = None): self._user_cancelled = True self.close() @@ -201,7 +201,7 @@ def _create_buttons(self, dialog, layout): # TODO: hookup the buttons to our methods, this may involve subclassing from QDialog if self.can_cancel: - buttons.rejected.connect(dialog.reject) + buttons.rejected.connect(self.reject) self._connections_to_remove.append( (buttons.rejected, dialog.reject) )