Beispiel #1
0
	def keyPressEvent(self, event):
		if event.key() == Qt.Key_Return and int(event.modifiers()) == (QtCore.Qt.ShiftModifier):
			children = self.getChildren()
			self.addSongs.emit(children, False)
		elif event.key() == Qt.Key_Return:
			children = self.getChildren()
			self.addSongs.emit(children, True)
		else:
			QTreeView.keyPressEvent(self, event)
Beispiel #2
0
 def keyPressEvent(self, event):
     """Reimplement Qt method"""
     if event.key() in (Qt.Key_Enter, Qt.Key_Return):
         self.clicked()
     elif event.key() == Qt.Key_F2:
         self.rename()
     elif event.key() == Qt.Key_Delete:
         self.delete()
     else:
         QTreeView.keyPressEvent(self, event)
Beispiel #3
0
 def keyPressEvent(self, event):
     """Reimplement Qt method"""
     if event.key() in (Qt.Key_Enter, Qt.Key_Return):
         self.clicked()
     elif event.key() == Qt.Key_F2:
         self.rename()
     elif event.key() == Qt.Key_Delete:
         self.delete()
     else:
         QTreeView.keyPressEvent(self, event)
Beispiel #4
0
 def keyPressEvent(self, event):
     if event.key() == Qt.Key_Return and int(
             event.modifiers()) == (QtCore.Qt.ShiftModifier):
         children = self.getChildren()
         self.addSongs.emit(children, False)
     elif event.key() == Qt.Key_Return:
         children = self.getChildren()
         self.addSongs.emit(children, True)
     else:
         QTreeView.keyPressEvent(self, event)
 def keyPressEvent(self, evt):
     """
     Protected method implementing special key handling.
     
     @param evt reference to the event (QKeyEvent)
     """
     if evt.key() in [Qt.Key_Delete, Qt.Key_Backspace] and \
        self.model() is not None:
         self.removeSelected()
         evt.setAccepted(True)
     else:
         QTreeView.keyPressEvent(self, evt)
Beispiel #6
0
 def keyPressEvent(self, event):
     QTreeView.keyPressEvent(self, event)
     item = self.selectedItem
     if hasattr(item, 'key_pressed'): item.key_pressed(event)
     self.key_press_event(event)
	def keyPressEvent(self, event):
		QTreeView.keyPressEvent(self, event)
		item = self.selectedItem
		if hasattr(item, 'key_pressed'): item.key_pressed(event)
		self.key_press_event(event)