Results 1 to 3 of 3

Thread: how to set the QToolBar's actions to multiple rows

  1. #1
    Join Date
    Jul 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Smile how to set the QToolBar's actions to multiple rows

    hi, when I use QToolBar add many QAction , how to make the actions into two or three rows, like the picture follows:


  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to set the QToolBar's actions to multiple rows

    use multiple toolbars.

    it's more convenient because you can grop action by functionality and allow users to hide some toolbars
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Jul 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to set the QToolBar's actions to multiple rows

    thank you very much!
    I found the solution, in the QMainWindow there is a funtion "addToolBarBreak" to add a new row.
    but first as you write use multiple toolbars ,as follows
    QToolBar * barTest = addToolBar(tr("aaaa"));
    .....// some actions in the first row
    this->addToolBarBreak();
    QToolBar * barTest2 = addToolBar(tr("bbbb"));
    .....// some other actions in the second row

Similar Threads

  1. Span QItemDelegate over multiple rows in view
    By supergillis in forum Qt Programming
    Replies: 1
    Last Post: 14th January 2011, 03:40
  2. QTableView: Select multiple rows?
    By realdarkman71 in forum Newbie
    Replies: 2
    Last Post: 9th December 2010, 21:36
  3. add multiple rows at a time in tablewidgets
    By rk0747 in forum Qt Programming
    Replies: 0
    Last Post: 15th April 2010, 06:54
  4. QTableWidget - Select multiple rows.
    By wally in forum Qt Programming
    Replies: 2
    Last Post: 21st October 2008, 17:15
  5. [QT4] QTreeView and rows with multiple lines
    By KShots in forum Qt Programming
    Replies: 8
    Last Post: 30th March 2006, 18:47

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.