How can divide QTabWidget into multiple lines?
-
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. -
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.
-
So instead, QT provides this fugly alternative:
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.
-
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.