PDA

View Full Version : Handle KeyRelease or KeyPress on any row in QTableView



AbuYusuf
11th February 2010, 19:09
How Can I Handle KeyRelease or KeyPress on any row in QTableView ?

e.g. i want to handle when DELETE key released to delete the selected row in QTableView, How can i do that ?
Also, INSERT key to insert empty row so the user can edit it's data to be as a new row, How ?

squidge
11th February 2010, 19:49
Have you tried subclassing the control and overriding keyPressEvent? Or installing an event filter on the QTableView?

AbuYusuf
11th February 2010, 20:04
thanks but, ..
Can you give me an example ?