--- a/ProjectFlask/FormSelectionDialog.py Sat May 29 15:04:41 2021 +0200 +++ b/ProjectFlask/FormSelectionDialog.py Sun May 30 17:33:37 2021 +0200 @@ -7,8 +7,8 @@ Module implementing a dialog to select the template type. """ -from PyQt5.QtCore import pyqtSlot, QCoreApplication -from PyQt5.QtWidgets import QDialog, QDialogButtonBox +from PyQt6.QtCore import pyqtSlot, QCoreApplication +from PyQt6.QtWidgets import QDialog, QDialogButtonBox from .Ui_FormSelectionDialog import Ui_FormSelectionDialog @@ -91,7 +91,8 @@ super().__init__(parent) self.setupUi(self) - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled(False) self.typeCombo.addItem("") for templateType in FormSelectionDialog.Templates: @@ -112,10 +113,12 @@ if templateType: self.preview.setPlainText( FormSelectionDialog.Templates[templateType]["template"]) - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(True) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled(True) else: self.preview.clear() - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled(False) def getTemplateText(self): """