Results 1 to 8 of 8

Thread: Getting QMenuBar of child widget to showup

Hybrid View

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

    Default Re: Getting QMenuBar of child widget to showup

    Hmm, make sure that all corresponding steps are done than in the example snippet and that at least one menu/action is added to the menu bar.
    J-P Nurmi

  2. #2
    Join Date
    Mar 2007
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    1

    Question Re: Getting QMenuBar of child widget to showup

    Quote Originally Posted by jpn View Post
    Hmm, make sure that all corresponding steps are done than in the example snippet and that at least one menu/action is added to the menu bar.
    I know the menu is setup right, because if I pass 0 as the parent it replaces the menu at the top of the MainWindow.

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

    Default Re: Getting QMenuBar of child widget to showup

    Quote Originally Posted by discostu View Post
    I know the menu is setup right, because if I pass 0 as the parent it replaces the menu at the top of the MainWindow.
    I think you just got me confused. Oh well, here's another example following more closely to what I think you might have. Hopefully this helps.
    Attached Files Attached Files
    J-P Nurmi

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

    discostu (6th July 2007)

  5. #4
    Join Date
    Mar 2007
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    1

    Talking Re: Getting QMenuBar of child widget to showup

    Quote Originally Posted by jpn View Post
    I think you just got me confused. Oh well, here's another example following more closely to what I think you might have. Hopefully this helps.
    Thanks. The problem seemed to be that the dockwidget was not being passed to the constructor of mywidget, but rather, mywidget was later added to the dockwidget. Doing it this way doest embed mywidget ok, but any menus created in the constructor don't show up.

Similar Threads

  1. Qdialog as a child widget
    By dave in forum Newbie
    Replies: 12
    Last Post: 14th November 2006, 09:43
  2. how to find a child widget?
    By TheRonin in forum Qt Programming
    Replies: 1
    Last Post: 8th November 2006, 10:30
  3. minimize child widget
    By sreedhar in forum Qt Programming
    Replies: 5
    Last Post: 15th May 2006, 12:02
  4. Move child widget along with the parent widget
    By sreedhar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 12:00
  5. Referencing Parent Widget from Child
    By taylor34 in forum Qt Programming
    Replies: 8
    Last Post: 11th April 2006, 15:13

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
  •  
Qt is a trademark of The Qt Company.