Qt gui 创建、小部件调整大小

发布于 2024-12-25 11:47:26 字数 168 浏览 1 评论 0原文

尽管我有多年的 MFC 编程经验,但我还是 Qt 开发的新手。我正在尝试创建一个可停靠小部件,并将一些控件放入停靠小部件(更准确地说是选项卡小部件)中。我的问题是停靠小部件内的选项卡小部件不会随父级一起调整大小。

我希望选项卡小部件填充停靠小部件的整个区域。是否可以在同一个 GUI 设计器中操作某些属性?

I am new to Qt development, even though I have years of MFC programming. I am trying to create a dockable widget and put some controls in the dock widget, a tab widget to be more precise. My problem is that the tab widget inside the dock widget doesn't resize along with the parent.

I'd like the tab widget to fill the entire area of the dock widget. Is it possible to manipulate some property in the same gui designer?

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

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

发布评论

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

评论(1

难忘№最初的完美 2025-01-01 11:47:26

我不知道我是否理解你的问题,但试试这个:单击 DockWidget 的任意位置(以及选项卡小部件之外),然后按红色箭头指示的按钮(它将是蓝色的)。是这样吗?

这样:

在此处输入图像描述

变成这样:

在此处输入图像描述

I don't know If I understood your question, but try this: click anywhere the DockWidget (and outside the tab widget) and press the button idicated by the red arrow (it will be blue). Is that it?

This:

enter image description here

Becomes this:

enter image description here

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