Пример #1
0
 def keyReleaseEvent( self, event ):
     " Triggered when a key is released "
     QComboBox.keyReleaseEvent( self, event )
     key = event.key()
     if key == Qt.Key_Enter or key == Qt.Key_Return:
         self.enterClicked.emit()
     return
Пример #2
0
 def keyReleaseEvent( self, event ):
     " Triggered when a key is released "
     QComboBox.keyReleaseEvent( self, event )
     if self.insert:
         key = event.key()
         if key == Qt.Key_Enter or key == Qt.Key_Return:
             self.addItem( self.lineEdit().text() )
             self.__enforceLimit()
             self.enterClicked.emit()
     return