关于 Qt Creator 小部件的一些问题

发布于 2024-11-13 11:42:35 字数 220 浏览 1 评论 0原文

你能帮我吗?

第一的: 如何使 Qt Creator 中主窗口的大小固定,使用户无法最大化?我将调整大小属性设置为(固定),但我仍然运行该项目并将其最大化。

第二: 如何让ToolBar固定在一个位置?我不想让用户更改其位置。

第三: 如果选中另一个项目,如何使 QMenu 中的一个项目不可选中?与 radioButton 类似,将一项设为默认值。

先感谢您。

could you help me?

First:
How can I make the size of main window in Qt Creator fixed,so users can not maximize?. I set resize propriety to ( fixed ) but I still run the project and maximize it .

Second:
How can keep ToolBar fixed in one location? I do not want change its location by users.

Third:
How can make an item in QMenu Not checkable if another item is check? Like radioButton and make one item as default.

Thank you in Advance.

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

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

发布评论

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

评论(1

断念 2024-11-20 11:42:35

第一:对maximumSize和minimumSize应用相同的大小(window->setMinimumSize(size), window->setMaximumSize(size)

第二:使用QToolBar的setMovable( ) 方法: toolbar->setMovable(false);

第三:实现一个监听动作的槽changed() 信号,并调用其他操作的 setCheckable() 方法,并传递 false 作为参数:actionToBeDisabled->setCheckable(false);

First: apply the same size to maximumSize and minimumSize (window->setMinimumSize(size), window->setMaximumSize(size))

Second: use the QToolBar's setMovable() method: toolbar->setMovable(false);

Third: Implement a slot that listens to the action's changed() signal, and calls the other action's setCheckable() method, passing false as an argument: actionToBeDisabled->setCheckable(false);

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