I've got an app with multiple tabs. I install an event filter on qApp to handle keystrokes as I would like to process certain keystrokes as shortcuts to do certain things.

For the most part it works, except when it doesn't.

Sometimes the keystrokes just don't get processed. After a while I noticed that when the keystrokes did not work, if I clicked around on various tabs, then after a couple of clicks of the mouse the keystrokes just start working.

What's going on and how do I fix it?

n