def keyPressEvent (self, event): '''Re-implementation of the QGraphicsTextItem's method keyPressEvent in order to provide QGraphicsTextItem with the QLineEdit's textChanged Event. @param event event ''' self.emit (SIGNAL ('textChanged(QString)'), QString(self.toPlainText())) QGraphicsTextItem.keyPressEvent(self, event)
def keyPressEvent(self, keyEvent): if keyEvent.key() == Qt.Key_Return or keyEvent.key() == Qt.Key_Enter: if self.__isSingleLine: self.setTextInteractionFlags(Qt.NoTextInteraction) return QGraphicsTextItem.keyPressEvent(self, keyEvent)
def keyPressEvent(self, event): """ Stuff to do during key press events. For now we have to adjust the outline box. """ QGraphicsTextItem.keyPressEvent(self, event) self.adjust_size()