Fix wrong argument type in QMessageBox.information
TypeError: information(QWidget, str, str, buttons: Union[QMessageBox.StandardButtons, QMessageBox.StandardButton] = QMessageBox.Ok, defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton): argument 4 has unexpected type 'str'
This commit is contained in:
parent
4ac162f18b
commit
d9db331580
|
@ -230,11 +230,11 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
|||
self.storage.decrypt(password)
|
||||
break
|
||||
except InvalidPassword as e:
|
||||
QMessageBox.information(None, _('Error'), str(e), _('OK'))
|
||||
QMessageBox.information(None, _('Error'), str(e))
|
||||
continue
|
||||
except BaseException as e:
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
QMessageBox.information(None, _('Error'), str(e), _('OK'))
|
||||
QMessageBox.information(None, _('Error'), str(e))
|
||||
return
|
||||
|
||||
path = self.storage.path
|
||||
|
|
|
@ -113,7 +113,7 @@ class HelpLabel(QLabel):
|
|||
self.font = QFont()
|
||||
|
||||
def mouseReleaseEvent(self, x):
|
||||
QMessageBox.information(self, 'Help', self.help_text, 'OK')
|
||||
QMessageBox.information(self, 'Help', self.help_text)
|
||||
|
||||
def enterEvent(self, event):
|
||||
self.font.setUnderline(True)
|
||||
|
@ -137,7 +137,7 @@ class HelpButton(QPushButton):
|
|||
self.clicked.connect(self.onclick)
|
||||
|
||||
def onclick(self):
|
||||
QMessageBox.information(self, 'Help', self.help_text, 'OK')
|
||||
QMessageBox.information(self, 'Help', self.help_text)
|
||||
|
||||
class Buttons(QHBoxLayout):
|
||||
def __init__(self, *buttons):
|
||||
|
@ -604,6 +604,6 @@ class TaskThread(QThread):
|
|||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication([])
|
||||
t = WaitingDialog(None, 'testing ...', lambda: [time.sleep(1)], lambda x: QMessageBox.information(None, 'done', "done", _('OK')))
|
||||
t = WaitingDialog(None, 'testing ...', lambda: [time.sleep(1)], lambda x: QMessageBox.information(None, 'done', "done"))
|
||||
t.start()
|
||||
app.exec_()
|
||||
|
|
Loading…
Reference in New Issue