Results 1 to 2 of 2

Thread: Showing and hiding menubar

  1. #1
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Showing and hiding menubar

    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

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Showing and hiding menubar

    Add the action to a visible widget with QWidget::addAction().
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    borges (23rd September 2007)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.