95 """ |
95 """ |
96 Protected method to handle the user pressing the escape key. |
96 Protected method to handle the user pressing the escape key. |
97 |
97 |
98 @param ev key event (QKeyEvent) |
98 @param ev key event (QKeyEvent) |
99 """ |
99 """ |
100 if ev.key() == Qt.Key_Escape: |
100 if ev.key() == Qt.Key.Key_Escape: |
101 res = E5MessageBox.yesNo( |
101 res = E5MessageBox.yesNo( |
102 self, |
102 self, |
103 self.tr("Close dialog"), |
103 self.tr("Close dialog"), |
104 self.tr("""Do you really want to close the dialog?""")) |
104 self.tr("""Do you really want to close the dialog?""")) |
105 if not res: |
105 if not res: |