Hi,
The Qt::FocusPolicy property holds the way the widget accepts keyboard focus (http://doc.qt.nokia.com/latest/qwidg...cusPolicy-prop)
to enable keyboard focus, add a call to setFocusPolicy(Qt::StrongFocus) in the widget constructor :
Well for the widget to be able to handle key-press event the widget has to have focus. Otherwise it is the MainWindow class which has focus and when you press your keyboard the MainWindow class will handle them and not the widget. Glad it works for you and also read what peace_comp posted and that link for more info
Bookmarks