use QKeySequence to detect platform dependent copy keys

This commit is contained in:
KIU Shueng Chuan 2021-02-03 10:40:51 +08:00
parent 968286a1cf
commit 6ad1d752fe

View File

@ -368,7 +368,7 @@ class TableWidget(QtGui.QTableWidget):
self.contextMenu.popup(ev.globalPos())
def keyPressEvent(self, ev):
if ev.key() == QtCore.Qt.Key_C and ev.modifiers() == QtCore.Qt.ControlModifier:
if ev.matches(QtGui.QKeySequence.Copy):
ev.accept()
self.copySel()
else: