[Interest] Capture keyPressEvent on QMenuBar/QMenu?

Frederik Christiani frederik at vikingsoftware.com
Thu Oct 11 12:54:32 CEST 2018


On 11-10-2018 02:02, Tony Rietwyk wrote:
> Hi Israel,
> 
> Try installEventFilter on the menu to see the KeyPress events before 
> they are handled by the menu.

In the eventFilter you'll want to look at the events of type
QEvent::ShortcutOverride. Remember to accept() the event if you don't 
want the shortcut action triggered.


Kind regards,
Frederik

-- 
Frederik Christiani
Viking Software
https://www.vikingsoftware.com/



More information about the Interest mailing list