博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
QButtonGroup:按钮类的非可视化容器,默认可实现按钮的子类实例的单选。
阅读量:7155 次
发布时间:2019-06-29

本文共 1544 字,大约阅读时间需要 5 分钟。

 

The  class provides a container to organize groups of button widgets.

 provides an abstract container into which button widgets can be placed. It does not provide a visual representation of this container (see  for a container widget), but instead manages the states of each of the buttons in the group.

An  button group switches off all checkable (toggle) buttons except the one that has been clicked. By default, a button group is exclusive. The buttons in a button group are usually checkable s,es (normally for non-exclusive button groups), or s. If you create an exclusive button group, you should ensure that one of the buttons in the group is initially checked; otherwise, the group will initially be in a state where no buttons are checked.

A button can be added to the group with () and removed with (). If the group is exclusive, the currently checked button is available with (). If a button is clicked, the() signal is emitted; for a checkable button in an exclusive group this means that the button has been checked. The list of buttons in the group is returned by ().

In addition,  can map between integers and buttons. You can assign an integer id to a button with (), and retrieve it with (). The id of the currently checked button is available with (), and there is an overloaded signal () which emits the id of the button. The id -1 is reserved by to mean "no such button". The purpose of the mapping mechanism is to simplify the representation of enum values in a user interface.

转载于:https://www.cnblogs.com/ribavnu/p/4802912.html

你可能感兴趣的文章
Javascript 输出表格
查看>>
何为Web Intents及其目前的实现状态
查看>>
对openGLES的粗浅认识
查看>>
Mac 虚拟机下进行 ios 开发札记(随时Update),一起进步
查看>>
TFT LCD控制显示总结(硬件概念、初始化相关配置)
查看>>
iOS开发之Objective-C与JavaScript交互操作
查看>>
协议森林12 天下为公 (TCP堵塞控制)
查看>>
EF如何获取所有对象名(表名)
查看>>
NSArray enumeration performance examined
查看>>
【科研论文】新型脉冲电子围栏网络化系统设计
查看>>
变量的多次使用之GO
查看>>
敏捷实践总结
查看>>
信号和槽(QT和sigslot)
查看>>
推荐一个有趣的软件"Process Monitor"
查看>>
android 蓝牙开发
查看>>
流媒体协议介绍(rtp/rtcp/rtsp/rtmp/mms/hls)
查看>>
C#集合类型大盘点
查看>>
Android FTP Server <1>
查看>>
SQL分页查询总结{转}
查看>>
mac OS X 安装svn
查看>>