Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can divide QTabWidget into multiple lines?
Forum Update on Monday, May 27th 2025

How can divide QTabWidget into multiple lines?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 4.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    psbhardwaj09gmail.com
    wrote on last edited by
    #1

    Hi,

    I have an application in which there are many tabwidgets i.e more than the width of window. Now i want to display all tabwidgets in my window in multiple lines. How can i do that. Can any one suggest me(any Example)?
    Thanks in advance.

    Pardeep Sharma

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Luckely, Qt does not support that. It is generally considered one of the worst UI mistakes to have ever seen the light of day.

      !http://hallofshame.gp.co.at/images/tabs/webform.gif(multi-line tabs)!

      Read "this page":http://hallofshame.gp.co.at/tabs.htm to further your understanding of why multi-line tabs are a Bad Idea(TM). In general: tabs just don't scale well. They are very useful for a limited number of pages, but beyond that, the usability starts to degrade very, very rapidly no matter what solution you come up with to cram more pages on it than will fit comfortably.

      C 1 Reply Last reply
      0
      • A andre

        Luckely, Qt does not support that. It is generally considered one of the worst UI mistakes to have ever seen the light of day.

        !http://hallofshame.gp.co.at/images/tabs/webform.gif(multi-line tabs)!

        Read "this page":http://hallofshame.gp.co.at/tabs.htm to further your understanding of why multi-line tabs are a Bad Idea(TM). In general: tabs just don't scale well. They are very useful for a limited number of pages, but beyond that, the usability starts to degrade very, very rapidly no matter what solution you come up with to cram more pages on it than will fit comfortably.

        C Offline
        C Offline
        Calvin H-C
        wrote on last edited by
        #3

        So instead, QT provides this fugly alternative:
        Sample.png

        I agree that some developers have gone overboard and provided a huge number of tabs that would be better presented another way, but if the number of tabs is kept to a minimum (say, a number that needs no more than two rows), then that would be nicer than displaying transparent scroll buttons over the tabs.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          To add to @andre, if you have that many tabs, you might want to consider refactoring your UI. Take for example the preferences of Qt Creator, the tabs are grouped by themes and you have a list view on the left to change the theme.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved