一杯清酒邀明月
天下本无事,庸人扰之而烦耳。
posts - 3121,comments - 209,views - 577万

QRadioButton 选中的方法比较简单:

ui->radioButton->setChecked(true);

 取消选中怎么办?如果单纯使用:

ui->radioButton->setChecked(false);

 你会发现,然并卵...

实际上,有效的方法之一,你可以尝试如下做法:

1 ui->radioButton->setAutoExclusive(false);
2 ui->radioButton->setChecked(false);
3 ui->radioButton->setAutoExclusive(true);

 

posted on   一杯清酒邀明月  阅读(3180)  评论(1编辑  收藏  举报
相关博文:
阅读排行:
· 在鹅厂做java开发是什么体验
· 百万级群聊的设计实践
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
历史上的今天:
2021-06-01 Qt QSS QPushButton
< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

点击右上角即可分享
微信分享提示