Пример #1
0
    def keyPressEvent(self, event):
        """
        Handles keyPress event.

        @note: Subclasses should carefully override this.
        Note that the default implementation doesn't permit ESC key
        as a way to close the PM_dialog. (This is typically desirable
        for Property Managers.) If any subclass needs to implement the key press,
        they should first call this method (i.e. superclass.keyPressEvent) and then
        implement specific code that closes the dialog when ESC key is pressed.
        """
        key = event.key()
        # Don't use ESC key to close the PM dialog. Fixes bug 2596
        if key == Qt.Key_Escape:
            pass
        else:
            QDialog.keyPressEvent(self, event)
        return
Пример #2
0
 def keyPressEvent(self, event):
     """
     Handles keyPress event. 
     
     @note: Subclasses should carefully override this. 
     Note that the default implementation doesn't permit ESC key 
     as a way to close the PM_dialog. (This is typically desirable
     for Property Managers.) If any subclass needs to implement the key press, 
     they should first call this method (i.e. superclass.keyPressEvent) and then 
     implement specific code that closes the dialog when ESC key is pressed.
     """
     key = event.key()
     # Don't use ESC key to close the PM dialog. Fixes bug 2596
     if key == Qt.Key_Escape:
         pass
     else:
         QDialog.keyPressEvent(self, event) 
     return
Пример #3
0
 def keyPressEvent(self, e):
     if e.key() == Qt.Key_Return:
         return
     return QDialog.keyPressEvent(self, e)
Пример #4
0
 def keyPressEvent(self, ev):
     if ev.key() not in (Qt.Key_Enter, Qt.Key_Return):
         return QDialog.keyPressEvent(self, ev)
Пример #5
0
 def keyPressEvent(self, e):
     if self.ignore_next_key:
         self.ignore_next_key = False
     else:
         QDialog.keyPressEvent(self, e)
Пример #6
0
 def keyPressEvent(self, ev):
     if ev.key() not in (Qt.Key_Enter, Qt.Key_Return):
         return QDialog.keyPressEvent(self, ev)
Пример #7
0
 def keyPressEvent(self, e):
     if e.key() == Qt.Key_Return:
         return
     return QDialog.keyPressEvent(self, e)
Пример #8
0
 def keyPressEvent(self, e):
     if self.ignore_next_key:
         self.ignore_next_key = False
     else:
         QDialog.keyPressEvent(self, e)
Пример #9
0
 def keyPressEvent(self, ev):
     if ev.key() == Qt.Key_Escape:
         if self.cancelable:
             self._canceled()
     else:
         QDialog.keyPressEvent(self, ev)
Пример #10
0
 def keyPressEvent(self, ev):
     if ev.key() == Qt.Key_Escape:
         if self.cancelable:
             self._canceled()
     else:
         QDialog.keyPressEvent(self, ev)