QT创建者 - 集中元素(Gridlayout)
mainwindow-> centralwidget-> stackedwidget-> page_startscreen-> gridlayout_startscreen-> (页面元素进入此处)
我已经学会了如何使用布局和垫片将QT创建者中心元素集中,但是当试图在堆叠widget页面中执行相同的操作时,我不能。我放了一个gridlayout以进行居中,但是Gridlayout本身并没有动态地占用所有可用的空间。它不会随窗口大小而改变。
我很惊讶我可以感到惊讶在线找到此信息。如果您在网上找到它,请告诉我如何看到我做错了什么。
MainWindow -> centralWidget -> stackedWidget -> page_startScreen -> gridLayout_StartScreen -> (page elements go in here)
I have learned how to center elements in QT Creator using layouts and spacers, but when trying to do the same inside of a stackedWidget page, I can't. I put in a gridLayout for centering, but the gridLayout itself does not dynamically take all available room. It won't change with window resizing.
Screenshot from the QT Creator project of the Form and the object tree.
I'm surprised I can't find this information online. If you found it online, please tell me how so I can see what I did wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论