Call setModal correctly

This commit is contained in:
Kovid Goyal 2021-11-22 08:25:45 +05:30
parent 7fe3d006d8
commit a6b29994e1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 3 additions and 2 deletions

View File

@ -60,7 +60,7 @@ class Wizard(QDialog):
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
self.setModal(Qt.WindowModality.WindowModal)
self.setWindowModality(Qt.WindowModality.WindowModal)
@property
def xpath(self):

View File

@ -931,7 +931,7 @@ class DeviceMixin: # {{{
def init_device_mixin(self):
self.device_error_dialog = error_dialog(self, _('Error'),
_('Error communicating with device'), ' ')
self.device_error_dialog.setModal(Qt.WindowModality.NonModal)
self.device_error_dialog.setModal(False)
self.device_manager = DeviceManager(FunctionDispatcher(self.device_detected),
self.job_manager, Dispatcher(self.status_bar.show_message),
Dispatcher(self.show_open_feedback),

View File

@ -278,6 +278,7 @@ class GuiRunner(QObject):
default_dir=initial_dir)
def show_error(self, title, msg, det_msg=''):
print(det_msg, file=sys.stderr)
self.hide_splash_screen()
with self.app:
error_dialog(self.splash_screen, title, msg, det_msg=det_msg, show=True)