ProjectDjangoTagsMenu/IfTagInputDialog.py

branch
eric7
changeset 55
5390ef66c327
parent 52
c264091162a2
child 60
85d3931419d3
--- a/ProjectDjangoTagsMenu/IfTagInputDialog.py	Sat May 29 15:04:13 2021 +0200
+++ b/ProjectDjangoTagsMenu/IfTagInputDialog.py	Sun May 30 11:51:44 2021 +0200
@@ -7,8 +7,8 @@
 Module implementing a dialog to enter the parameters for the if tag.
 """
 
-from PyQt5.QtCore import pyqtSlot
-from PyQt5.QtWidgets import QDialog, QDialogButtonBox
+from PyQt6.QtCore import pyqtSlot
+from PyQt6.QtWidgets import QDialog, QDialogButtonBox
 
 from .Ui_IfTagInputDialog import Ui_IfTagInputDialog
 
@@ -21,27 +21,32 @@
         """
         Constructor
         
-        @param parent reference to the parent widget (QWidget)
+        @param parent reference to the parent widget
+        @type QWidget
         """
         super().__init__(parent)
         self.setupUi(self)
         
-        self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Ok).setEnabled(False)
     
     @pyqtSlot(str)
     def on_ifEdit_textChanged(self, txt):
         """
         Private slot to handle changes of the 'if' expression.
         
-        @param txt text of the line edit (string)
+        @param txt text of the line edit
+        @type str
         """
-        self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(bool(txt))
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Ok).setEnabled(bool(txt))
     
     def getTag(self):
         """
         Public method to retrieve the tag.
         
-        @return tag (string)
+        @return tag
+        @rtype str
         """
         tag = '{{% if {0} %}}\n'.format(self.ifEdit.text())
         elifText = self.elifEdit.toPlainText()

eric ide

mercurial