Pass TableWidget key press events to the parent class to allow for arrow key and tab navigation.

This commit is contained in:
Kenneth Lyons 2015-10-24 21:24:20 -07:00
parent 1036edf618
commit 0904fb4b61

View File

@ -353,11 +353,11 @@ class TableWidget(QtGui.QTableWidget):
self.contextMenu.popup(ev.globalPos())
def keyPressEvent(self, ev):
if ev.text() == 'c' and ev.modifiers() == QtCore.Qt.ControlModifier:
if ev.key() == QtCore.Qt.Key_C and ev.modifiers() == QtCore.Qt.ControlModifier:
ev.accept()
self.copy()
self.copySel()
else:
ev.ignore()
QtGui.QTableWidget.keyPressEvent(self, ev)
def handleItemChanged(self, item):
item.itemChanged()