- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我在网上查了很久都没有。有谁知道如何访问按钮框中的按钮(使用“右按钮对话框”模板创建)?
最佳答案
在 Designer 中,选择 OK
或 Cancel
按钮。然后打开属性编辑器并向下滚动到 QDialogButtonBox
部分。然后您可以展开 standardButtons
项以查看可用的各种按钮。其他属性,例如 centerButtons
属性,也可用。
但是,设计器让您对按钮框的控制非常少。
在代码中,您可以做很多其他事情,例如更改出现在“标准按钮”上的文本。来自documentation :
findButton = new QPushButton(tr("&Find"));
findButton->setDefault(true);
moreButton = new QPushButton(tr("&More"));
moreButton->setCheckable(true);
moreButton->setAutoDefault(false);
buttonBox = new QDialogButtonBox(Qt::Vertical);
buttonBox->addButton(findButton, QDialogButtonBox::ActionRole);
buttonBox->addButton(moreButton, QDialogButtonBox::ActionRole);
只要在设计器中给按钮框起个名字,就可以在代码中设置这些属性。
关于c++ - 如何更改 Qt Designer 中按钮框内按钮的属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2671323/
我正在尝试将按钮和 div 底部的一些文本对齐,就像下面的示例中的价格和 checkout 按钮一样。最好的方法是什么。我制作了一个 div,对其设置了样式以获得正确的文本和图片。我只需要将按钮附加到
将内容放置在带圆 Angular 的框 div 中以使其不会重叠的正确方法是什么? 蓝框是白框父div 里面的内容div。我希望标题位于该父框内,以便它在顶部也有圆 Angular 。 当我尝试“溢出
让 SVG 内联 HTML 文档,带有一个 View 框“x y w h”。如何检查元素是否在 View 框内? 通过说元素,它可以是组内的嵌套子路径等等...... 所以我想我正在寻找 SVG 的内
有没有办法检查鼠标是否在屏幕上的某个框内。我不知道将 jQuery 变量导出为整数以在 Javascript if 语句 中使用。我知道这可以通过 div 实现,但我不想使用 div 因为我需要很多这
目前我有两个带文本的 div 框 1 和 2,在第三个 div 框内将它们包含在一起。 Sometimes text in box 1 is longer than text inside box2
我是一名优秀的程序员,十分优秀!