def __init__(self): QEventLoop.__init__(self) self.dialog_closed.connect(self.exit, type=Qt.QueuedConnection)