Changed app.exec_ by app.exec (future PyQt6)

This commit is contained in:
Adolfo Gómez García 2021-08-21 23:05:20 +02:00
parent 75e54618bb
commit e637f208bd
3 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ if __name__ == "__main__":
timer.start(1000)
timer.timeout.connect(lambda *a: None) # timeout can be connected to a callable
qApp.exec_()
qApp.exec()
# On windows, if no window is created, this point will never be reached.
qApp.end()

View File

@ -192,4 +192,4 @@ if __name__ == "__main__":
myapp = UDSConfigDialog()
myapp.show()
sys.exit(app.exec_())
sys.exit(app.exec())

View File

@ -62,7 +62,7 @@ class UDSConfigDialog(QDialog):
self.ui.host.setText(self._config.host)
self.ui.validateCertificate.setCurrentIndex(1 if self._config.validateCertificate else 0)
self.ui.logLevelComboBox.setCurrentIndex(self._config.log_level)
self.ui.serviceToken.setText(self._config.master_token)
self.ui.serviceToken.setText(self._config.master_token or '')
self.ui.testButton.setEnabled(bool(self._config.master_token and self._config.host))
@ -153,4 +153,4 @@ if __name__ == "__main__":
myapp = UDSConfigDialog()
myapp.show()
sys.exit(app.exec_())
sys.exit(app.exec())