PDA

View Full Version : MenuBar grabs focus on ALT pressed.



Cutey
9th January 2007, 10:35
Hi Buddies,

How do I prevent "MenuBar" from stealing the focus when the user presses the ALT - key?

I just need under some circumstances *every* ALT - key press event to be received by the widget that has the focus without the focus being lost in between.
Is it a Qt Bug?

Note:
I am using Qt 3.3.4 on Windows.

e8johan
9th January 2007, 10:41
Try pressing ALT in any windows application with a menu bar - that is how the menu bar works there. I guess that you will have to install an event filter for the application and direct all the ALT presses to your widget or have a filter removing the ALT presses from the QMenuBar.

wysota
9th January 2007, 11:45
I guess this is a double thread (http://www.qtcentre.org/forum/f-qt-designer-3/t-menubar-grabs-the-focus-on-alt-pressed-5113.html).