View Full Version : QActions don't work with menubar hidden

16th August 2007, 01:41
I'm porting my app to Qt 4.

I found a serious problem. When the menubar is hidden, the QActions don't work.

I just create QActions, some QMenus where I add the actions, and finally I add the menus to the main window menubar.

The key shortcuts work as long as the menubar is visible, but if I hide it then they don't work.

My app is a videoplayer, so of course I have to hide the menubar in fullscreen mode.

Previously, with Q3Actions, the shortcuts worked ok with the menubar hidden.

I already tried with setShortcutContext(Qt::ApplicationShortcut) but no way, it doesn't work :(

How can I get the same behaviour of Q3Action? Without that, my app is useless!

16th August 2007, 02:04
Fixed by adding the QActions to the main window.