What's the focus policy of the widget you want to capture the key in?
Everything is set to default.
I'm assuming the MainWindow and centralwidget() configuration do something to intercept the Up/Down Keys.
I figured that's why I get the QEvent::ShortcutOverride event when I press the Up/Down key while sniffing the Foo widget's events.
Default focus policy of QWidget (and QMainWindow as well) is NoFocus.
Your widget simply doesn't have focus so it won't receive key events. If you want something to happen on a specific key combination you can register a shortcut for that combination - this is done via QShortcut (of course you still won't receive a keyPressEvent in your widget).
Well I would think it has some focus as I receive all key events except the arrows.
Bookmarks