Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
KeyPressEvent not firing in my QDialog derived class. <SOLVED>
Bear35645 last edited by
On my form I have a QTableView widget. In the constructor for the form class I call "grabKeyBoard()."
I have implemented the keyPressEvent() in my class. However, it is not called when I press a key. I believe this is because the QTableView has taken control of the keyboard. How can I force all keyboard input to the form itself?
You can use "installEventFilter":http://doc.qt.io/qt-5/eventsandfilters.html#event-filters on the QTableView and handle what you want in your dialog.
Hope it helps