예제 #1
0
    def keyPressEvent(self, event):
        '''Handle key pressed event.

        Argument(s):
        event (QKeyEvent): Key event
        '''
        QGraphicsTextItem.keyPressEvent(self, event)
        self.parentItem().updateShapeAndEdges()
예제 #2
0
    def keyPressEvent(self, event):
        '''Handle key pressed event.

        Argument(s):
        event (QKeyEvent): Key event
        '''
        QGraphicsTextItem.keyPressEvent(self, event)
        self.parentItem().updateShapeAndEdges()
예제 #3
0
 def textkeyPressEvent(self, event):
     """
     Must intercept invalid input events.  Make changes here
     """
     a = event.key()
     text = event.text()
     if a in [Qt.Key_Space, Qt.Key_Tab]:
         return
     elif a in [Qt.Key_Return, Qt.Key_Enter]:
         self.inputMethodEventHandler(event)
         return
     # elif unicode(text).isalpha():
     elif text.isalpha():
         return
     else:
         return QGraphicsTextItem.keyPressEvent(self._label, event)
예제 #4
0
 def textkeyPressEvent(self, event):
     """
     Must intercept invalid input events.  Make changes here
     """
     a = event.key()
     text = event.text()
     if a in [Qt.Key_Space, Qt.Key_Tab]:
         return
     elif a in [Qt.Key_Return, Qt.Key_Enter]:
         self.inputMethodEventHandler(event)
         return
     # elif unicode(text).isalpha():
     elif text.isalpha():
         return
     else:
         return QGraphicsTextItem.keyPressEvent(self._label, event)
예제 #5
0
 def keyPressEvent(self, event: QKeyEvent):
     """Must intercept invalid input events.  Make changes here
     """
     a = event.key()
     text = event.text()
     if a in [Qt.Key_Space, Qt.Key_Tab]:
         return
     elif a in [Qt.Key_Escape]:
         self.updateLabel()
         self.focusOut()
         return
     elif a in [Qt.Key_Return, Qt.Key_Enter]:
         self.inputMethodEvent(event)
         return
     elif text.isalpha():
         return
     else:
         return QGraphicsTextItem.keyPressEvent(self, event)
예제 #6
0
파일: node.py 프로젝트: MatthieuDien/DotEd
 def keyPressEvent(self, e):
     QGraphicsTextItem.keyPressEvent(self, e)
     self.parentItem().update()
예제 #7
0
파일: node.py 프로젝트: MatthieuDien/DotEd
 def keyPressEvent(self, e):
     QGraphicsTextItem.keyPressEvent(self, e)
     self.parentItem().update()