QT对话框当建筑物切断我的UI内容时,如何调整对话框大小,以免发生?

发布于 2025-02-09 18:47:40 字数 535 浏览 1 评论 0原文

这是正在发生的事情的示例。上面是我的UI的简单设计,但是下面当我构建项目时,内部的所有内容都被削减了。有什么问题?尽管试图调整一堆小部件,但我似乎找不到它。

这是我的QT对话框结构现在的样子。 然后在我的主角文件中我刚刚有

w.setFixedSize(560,180);
w.setWindowTitle("Servo Control");

enter image description here

Here is the example of what is happening. Above is the simple design of my UI, but below when I build my project, everything within is getting cut. What is the issue? I can't seem to find it despite trying to resize a bunch of my widgets.

enter image description here

This is what my QT dialog box structure looks like right now.
Then in my main.cpp file I just had

w.setFixedSize(560,180);
w.setWindowTitle("Servo Control");

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

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

发布评论

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

评论(1

铁轨上的流浪者 2025-02-16 18:47:41

更新:我将网格布局应用于最外层的层次结构,这解决了我的问题。虽然很奇怪,因为我关注的视频没有任何布局,但没有遇到同样的问题。

Update: I applied a grid layout to the outermost hierarchy and this fixed my problem. Strange though because the video I was following did not have any layout on it, but did not run into the same problem.

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