Results 1 to 8 of 8

Thread: how to make Multi-Row QTabWidget

  1. #1
    Join Date
    Apr 2008
    Posts
    41
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to make Multi-Row QTabWidget

    I have eight tab at the QTabWidget,i want it have two Row
    Is there a way to make QTabWidget's QTabbar grow downward when it reaches its width limit? So you would end up with multiple rows of tabs.

  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: how to make Multi-Row QTabWidget

    You can instead use QToolButton/ button group and use QStackedWidget with it.
    It will be more appropriate to ur requirement

  3. #3
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    509
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to make Multi-Row QTabWidget

    Hi, another possibility is QToolBox as an alternative to a tabwidget.

    Ginsengelf

  4. #4
    Join Date
    Apr 2008
    Posts
    41
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to make Multi-Row QTabWidget

    Quote Originally Posted by Ginsengelf View Post
    Hi, another possibility is QToolBox as an alternative to a tabwidget.

    Ginsengelf
    Thank you ,but I want to usr QTabWidget

  5. #5
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    509
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to make Multi-Row QTabWidget

    Hi, in that case I think you have to create your own subclass of QTabBar, and layout the tabs yourself (or maybe QTabBar even provides methods to change the layout of the tabs, I don't know that).

    Ginsengelf

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to make Multi-Row QTabWidget

    Are you sure you want tabs in multiple rows? It's one of Microsoft's worst decisions to introduce such a control... I'd really think about using something better (QToolBox is a Bad widget as well, so I wouldn't use it) like a combobox with a stacked widget or a list widget with a stacked widget; they use the space much more efficiently than tool boxes or multiple row tabs.

  7. #7
    Join Date
    Apr 2008
    Posts
    41
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Smile Re: how to make Multi-Row QTabWidget

    Thanks!!!
    I will think about the stack widget

  8. #8
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: how to make Multi-Row QTabWidget

    Here is feature request about multi-row tab bar: https://bugreports.qt-project.org/browse/QTBUG-2061 - please vote!

  9. The following user says thank you to bmn for this useful post:

    Pardeep (18th June 2013)

Similar Threads

  1. How do I add new tab to QTabWidget
    By pcmantinker in forum Qt Programming
    Replies: 2
    Last Post: 6th June 2008, 04:24
  2. Window OS make distclean && qmake && make one line
    By patrik08 in forum General Programming
    Replies: 4
    Last Post: 22nd March 2007, 10:43
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

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.