Results 1 to 2 of 2

Thread: multiple toolbars overlap

  1. #1
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default multiple toolbars overlap

    i want to make an interface with two toolbars
    the first is not movable but the second is
    the problem is that when i set the size policy the first toolbar is covered by the second

    this is the code i am using

    Qt Code:
    1. player_toolbar = addToolBar(tr("Player"));
    2. player_toolbar->setMovable(false);
    3. player_toolbar->addWidget(new Spacer());
    4. player_toolbar->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
    5.  
    6. main_toolbar = addToolBar(tr("Main"));
    7. main_toolbar->setMovable(false);
    To copy to clipboard, switch view to plain text mode 

    spacer is just a widget with setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);

    each toolbar should get its own horizontal space

  2. #2
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: multiple toolbars overlap

    never mind. i read through the documentation and found
    Qt Code:
    1. QMainWindow::addToolBarBreak ( Qt::ToolBarArea area = Qt::TopToolBarArea );
    To copy to clipboard, switch view to plain text mode 
    http://doc.trolltech.com/4.7/qmainwi...ddToolBarBreak

Similar Threads

  1. Can I Programatically Overlap Dock Widgets?
    By bieber in forum Qt Programming
    Replies: 0
    Last Post: 29th June 2010, 20:42
  2. Axis Tick Labels Overlap
    By amoswood in forum Qwt
    Replies: 3
    Last Post: 8th June 2010, 16:52
  3. Widget overlap
    By Oleg in forum Qt Programming
    Replies: 1
    Last Post: 29th March 2010, 20:53
  4. ToolBars with different height
    By Radagast in forum Qt Programming
    Replies: 1
    Last Post: 27th July 2008, 12:17
  5. what happened to toolBars() in Qt4?
    By momesana in forum Qt Programming
    Replies: 7
    Last Post: 25th September 2007, 01:07

Tags for this Thread

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.