QTabWidget with multiple line?

戏子无情 提交于 2019-12-12 04:47:51

问题


Is it possible to make QTabWidget behave like windows system , use multiple line when there's just too much tabs ?

I checked qt's doc , seems no such thing was available.


回答1:


You would need to subclass QTabWidget or Widget and implement this functionality yourself. I would recommend that you consider a different approach if you plan more tabs than will conveniently all fit in a single line (without arrows or multiple rows). Tabs on multiple rows, although common enough, are widely considered to be a bad UI experience. A single row with arrows is only marginally better :)




回答2:


You will need to implement QTabBar to render the lines differently, and then use QTabWidget::setTabBar() to your new implementation.



来源:https://stackoverflow.com/questions/8542115/qtabwidget-with-multiple-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!