Skip to content

MnemonicAttached: Rework event filter

Kai Uwe Broulik requested to merge work/kbroulik/mnemonic-event-filter into master

Currently, every single attached property instance would install an event filter on the window. Instead, use a singleton and install it on qGuiApp.

This is also in line with what Breeze style does. Installing it on qGuiApp also saves us the trouble with render windows. It seems the event handling is pretty wonky in complicated nested window setups like System Settings, where the render window isn't determined in time.


@mart @davidedmundson

Opened System Settings, hit Alt, my mnemonics showed up reliably now. Before that on the landing page it wouldn’t work for some reason, only when I switched to other KCMs and back.

Breeze has had an event filter on qApp for the longest time without checking for the window active btw.

Edited by Kai Uwe Broulik

Merge request reports