--- a/SelectionEncloser/ConfigurationPage/SelectionEncloserEditDialog.py Tue Jun 01 18:01:14 2021 +0200 +++ b/SelectionEncloser/ConfigurationPage/SelectionEncloserEditDialog.py Tue Jun 01 18:45:45 2021 +0200 @@ -7,8 +7,8 @@ Module implementing a dialog to edit an enclosing menu entry. """ -from PyQt5.QtCore import pyqtSlot -from PyQt5.QtWidgets import QDialog, QDialogButtonBox +from PyQt6.QtCore import pyqtSlot +from PyQt6.QtWidgets import QDialog, QDialogButtonBox from .Ui_SelectionEncloserEditDialog import Ui_SelectionEncloserEditDialog @@ -21,9 +21,12 @@ """ Constructor - @param title menu entry title (string) - @param string enclosing string or string format expression (string) - @param parent reference to the parent widget (QWidget) + @param title menu entry title + @type str + @param string enclosing string or string format expression + @type str + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent) self.setupUi(self) @@ -40,7 +43,7 @@ """ Private slot to set the status of the OK button. """ - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( bool(self.titleEdit.text()) and bool(self.stringEdit.text())) @pyqtSlot(str) @@ -48,7 +51,8 @@ """ Private slot to react on changes of the title. - @param txt title text (string) + @param txt title text + @type str """ self.__updateOkButton() @@ -57,7 +61,8 @@ """ Private slot to react on changes of the string. - @param txt enclosing string (string) + @param txt enclosing string + @type str """ self.__updateOkButton() @@ -65,7 +70,8 @@ """ Public method to get the dialog data. - @return tuple with menu entry title (string) and enclosing string - or string format expression (string) + @return tuple with menu entry title and enclosing string or string + format expression + @rtype tuple of (str, str) """ return self.titleEdit.text(), self.stringEdit.text()