Re: TableView keypress event
Quote:
Originally Posted by
yur0k
Hi, everyone!
Cause i've created tableView in *.ui i can't simple use keyPressEvent for tableView only for MainWindow (it doesn't recognize tableView or textEdit).
Create your own subclass of QTableView with whatever custom behaviour you want. Let's call it MyTableView, defined in mytableview.h and implemented in mytableview.cpp.
In the main window UI right-click the QTableView and select "Promote to..."
Provide the promoted class name "MyTableView", and the header file "mytableview.h".
Click Add.
The ui compiler should use your custom class name and header file in the generated code.
Re: TableView keypress event
Ok, i'll try it. Thank you.