예제 #1
0
 def accept(self):
     try:
         text = self.textedit.toPlainText()
         self.editor = HtmlEditor.from_string(text, 'py')
         super(CodeInput, self).accept()
     except ParseException:
         QtWidgets.QMessageBox.critical(self, "Parsing error", "Could not parse the given text.")
예제 #2
0
 def accept(self):
     try:
         text = self.textedit.toPlainText()
         self.editor = HtmlEditor.from_string(text, 'py')
         super(CodeInput, self).accept()
     except ParseException:
         QtWidgets.QMessageBox.critical(self, "Parsing error",
                                        "Could not parse the given text.")