--- a/ProjectDjangoTagsMenu/MultiLineInputDialog.py Sat May 29 15:04:13 2021 +0200 +++ b/ProjectDjangoTagsMenu/MultiLineInputDialog.py Sun May 30 11:51:44 2021 +0200 @@ -7,7 +7,7 @@ Module implementing a dialog for the input of multi line text. """ -from PyQt5.QtWidgets import QDialog +from PyQt6.QtWidgets import QDialog from .Ui_MultiLineInputDialog import Ui_MultiLineInputDialog @@ -20,9 +20,12 @@ """ Constructor - @param label label for the entry field (string) - @param default default value for the entry field (string) - @param parent reference to the parent widget (QWidget) + @param label label for the entry field + @type str + @param default default value for the entry field + @type str + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent) self.setupUi(self) @@ -31,7 +34,8 @@ """ Public method to retrieve the multi line text. - @return multi line text (string) + @return multi line text + @rtype str """ return self.multiLineEdit.toPlainText() @@ -41,16 +45,20 @@ Public static method to create the dialog and return the multi line text. - @param parent reference to the parent widget (QWidget) - @param title title of the dialog (string) - @param label label for the entry field (string) - @param default default value for the entry field (string) - @return multi line text (string) and a flag indicating the acceptance - state (boolean) + @param parent reference to the parent widget + @type QWidget + @param title title of the dialog + @type str + @param label label for the entry field + @type str + @param default default value for the entry field + @type str + @return multi line text and a flag indicating the acceptance state + @rtype tuple of (str, bool) """ dlg = MultiLineInputDialog(label, default, parent) dlg.setWindowTitle(title) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: return dlg.getData(), True else: return "", False