Results 1 to 2 of 2

Thread: Stack two QMenuBars instead of side by side?

  1. #1
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Stack two QMenuBars instead of side by side?

    I am trying to figure this out, but have not reached a solution thus far.

    Problem:
    Qt Code:
    1. QMenuBar *menubar1 = addToolBar(tr("blah"));
    2. QMenuBar *menubar2 = addToolBar(tr("blah2"));
    To copy to clipboard, switch view to plain text mode 

    When it launches in a mainwindow it's like this:

    [menubar1] | [menubar2]

    I would like it to appear like this:

    [menubar1]
    [menubar2]

    How is this accomplished?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Stack two QMenuBars instead of side by side?

    By the way, you are using QMenuBar *, while addToolBar() returns QToolBar*

    As for the answer, use QMainWindow::addToolBarBreak between addToolBar functions

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.