PDA

View Full Version : Showing and hiding menubar



borges
23rd September 2007, 10:34
Hi all,

i'm porting a qt3 application to qt4 which has a checkable menu action to show and hide menubar with a shortcut (ctrl-m) associated.

In qt3 all works fine: i press Ctrl-m and menubar hides, ctrl-m again and menubar shows, but in qt4 the shortcut only works if menubar is visible (i.e. ctrl-m hides it, but ctrl-m again doesn't show menubar anymore)

How can i fix this?
Thanks in advance

jpn
23rd September 2007, 10:56
Add the action to a visible widget with QWidget::addAction().