包裹菜单栏的 Qt Tab 小部件

发布于 2024-09-26 00:21:47 字数 139 浏览 0 评论 0原文

当 QTabWidget 的菜单超出其宽度时,默认行为是将选项卡菜单变成水平可滚动列表。我更喜欢将菜单环绕起来,这样你现在就有了两行选项卡。此样式用于某些 Windows 对话框。但我找不到任何方法来做到这一点。

有谁知道允许这种布局的技巧或选项?

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 Windows 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

丢了幸福的猪 2024-10-03 00:21:48

流布局可以满足您的需要,但是您还必须制作自己的“选项卡小部件” http://doc.trolltech.com/4.7/layouts-flowlayout.html

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

绳情 2024-10-03 00:21:47

此选项当前不适用于 QTabWidget。也许您可以使用一些QTabBars来模拟这种行为?

Qt 的错误跟踪器,但尚未取得任何进展。也许有人知道另一个组件/解决方案。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文