Merge pull request #241 from ixjlyons/tablewidget-keypress
TableWidget key press events
This commit is contained in:
commit
5b8d5583a6
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user