开发者

Qt Tab widget that wraps its menu bar

开发者 https://www.devze.com 2023-01-18 15:30 出处:网络
When the menu of a QTabWidget grows beyond its width, the default behaviour is to turn the tab menu into a horizontaly scrollable list. What I\'d prefer is to wrap the menu round so you now have two r

When the menu of a QTabWidget grows beyond its width, the default behaviour is to turn the tab menu into a horizontaly scrollable list. What I'd prefer is to wrap the menu round so you now have two rows of tabs. This style is used on some W开发者_运维技巧indows dialogs. I can't find any way to do this though.

Is anyone aware of a trick or option to allow this kind of layout?


This option is currently not available for QTabWidget. Perhaps you could simulate this behavior using a few QTabBars?

There is an outstanding request for this on Qt's bug tracker but no progress on it yet. Perhaps somebody knows of another component/solution.


Flow layout does what you need, but then you will have to also make your own "tab widget" http://doc.trolltech.com/4.7/layouts-flowlayout.html

0

精彩评论

暂无评论...
验证码 换一张
取 消