[Qt-interest] Menu accelerators without the Alt key
andrew.m.goth at l-3com.com
andrew.m.goth at l-3com.com
Tue Jun 9 16:41:51 CEST 2009
Malyushytsky, Alex wrote:
> Andy Goth wrote:
> > When I preview my main window in Qt 4.5.0 Designer, I am able
> > to select menus simply by pressing their accelerator key,
> > without pressing or holding Alt. But when I run my
> > application using this same main window, I must use Alt to
> > access the menubar accelerators. It is important that Alt
> > not be required. How can I make the menubar accelerators
> > work in my application the same way they do in the Designer
> > preview? The main window doesn't contain any text entry widgets
> > or widgets with accelerators, not counting the menubar.
>
> I afraid really to achieve this you need to force Microsoft
> to change system behavior. This is set by the option in Display
> properties / Effects. You probably could change the style to
> ignore this settings, but it is not set by application normally.
> This is user chosen setting which supposed to apply to each
> application running on the system. Designer has a reason to do
> it - it has to simplify design of the application, which is much
> easier if you see everything at one glance.
We're talking about two different things. You're telling me about how to force the *display* of keyboard accelerator underlines. That's not an issue, especially since my application is not running on MS-Windows. I'm asking how to make keyboard accelerators work without having to press or hold the Alt key.
So... how do I make the Alt key optional? In Designer preview, I can press the accelerator without using Alt. When actually running the application, Alt is required. I want the Designer behavior.
Maybe a simple example will help illustrate my question. Let's say I have a &File menu. In Designer, I can press "F" to get the menu. Outside Designer, I must either press "Alt+F" or "Alt" and then "F".
--
Andy Goth
<amgoth at link.com>
More information about the Qt-interest-old
mailing list