467 @pyqtSlot() |
467 @pyqtSlot() |
468 def on_closeButton_clicked(self): |
468 def on_closeButton_clicked(self): |
469 """ |
469 """ |
470 Private slot to close the widget. |
470 Private slot to close the widget. |
471 """ |
471 """ |
472 self.__editor.setFocus(Qt.OtherFocusReason) |
472 self.__editor.setFocus(Qt.FocusReason.OtherFocusReason) |
473 self.close() |
473 self.close() |
474 |
474 |
475 def keyPressEvent(self, event): |
475 def keyPressEvent(self, event): |
476 """ |
476 """ |
477 Protected slot to handle key press events. |
477 Protected slot to handle key press events. |
478 |
478 |
479 @param event reference to the key press event |
479 @param event reference to the key press event |
480 @type QKeyEvent |
480 @type QKeyEvent |
481 """ |
481 """ |
482 if event.key() == Qt.Key_Escape: |
482 if event.key() == Qt.Key.Key_Escape: |
483 self.close() |
483 self.close() |
484 |
484 |
485 def __convertText(self, txt, oldFormat, newFormat): |
485 def __convertText(self, txt, oldFormat, newFormat): |
486 """ |
486 """ |
487 Private method to convert text from one format into another. |
487 Private method to convert text from one format into another. |