MCPcopy Index your code
hub / github.com/PyQt5/PyQt / keyPressEvent

Method keyPressEvent

QTableView/CopyContent.py:40–44  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

38 print(index.row(), index.column(), index.data())
39
40 def keyPressEvent(self, event):
41 super(TableView, self).keyPressEvent(event)
42 # Ctrl + C
43 if event.modifiers() == Qt.ControlModifier and event.key() == Qt.Key_C:
44 self.copyData()
45
46 def copyData(self):
47 count = len(self.selectedIndexes())

Callers

nothing calls this directly

Calls 1

copyDataMethod · 0.95

Tested by

no test coverage detected