I would like to capture a Key Down
Event on a QTableView
. I would also like to determine, if it was a keydown on DEL
button, my QTableView
is created like this (from QtCreator
):
self.tblview_data_sources = QtWidgets.QTableView(self.groupBox_2)
self.tblview_data_sources.setGeometry(QtCore.QRect(10, 20, 721, 121))
self.tblview_data_sources.setObjectName("tblview_data_sources")
If it is in fact a DEL-Keydown I would like to revmove the row which is selected at the moment.
QTableView
has this method keyPressEvent
which needs a QKeyEvent
- how do I get this Event?