QCheckBox
#include <QCheckBox>
Properties
- tristate : bool
- 11 properties inherited from QAbstractButton
- 59 properties inherited from QWidget
- 1 property inherited from QObject
Public Functions
QCheckBox(QWidget *parent = nullptr) | |
QCheckBox(const QString &text, QWidget *parent = nullptr) | |
virtual | ~QCheckBox() |
Qt::CheckState | checkState() const |
bool | isTristate() const |
void | setCheckState(Qt::CheckState state) |
void | setTristate(bool y = true) |
Reimplemented Public Functions
virtual QSize | minimumSizeHint() const override |
virtual QSize | sizeHint() const override |
- 21 public functions inherited from QAbstractButton
- 214 public functions inherited from QWidget
- 34 public functions inherited from QObject
- 14 public functions inherited from QPaintDevice
Signals
void | stateChanged(int state) |
- 4 signals inherited from QAbstractButton
- 3 signals inherited from QWidget
- 2 signals inherited from QObject
Protected Functions
void | initStyleOption(QStyleOptionButton *option) const |
Reimplemented Protected Functions
virtual void | checkStateSet() override |
virtual bool | event(QEvent *e) override |
virtual bool | hitButton(const QPoint &pos) const override |
virtual void | mouseMoveEvent(QMouseEvent *e) override |
virtual void | nextCheckState() override |
virtual void | paintEvent(QPaintEvent *) override |
- 14 protected functions inherited from QAbstractButton
- 35 protected functions inherited from QWidget
- 9 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
Additional Inherited Members
- 5 public slots inherited from QAbstractButton
- 19 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 5 static public members inherited from QWidget
- 10 static public members inherited from QObject
- 1 protected slot inherited from QWidget
- 2 protected variables inherited from QObject
- 1 protected type inherited from QPaintDevice
Detailed Description
The QCheckBox widget provides a checkbox with a text label.
使用案例
绑定槽函数:
connect(this->dCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotDCheckBoxChangeState(int)));
void slotDCheckBoxChangeState(int stateParam) { if (stateParam==2) { //选中 } if(stateParam ==0) { //取消选中 } }
####################
QQ 3087438119
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
2021-06-16 C# opencv Form显示图片
2020-06-16 IfcProjectionElementTypeEnum
2020-06-16 IfcPhysicalOrVirtualEnum
2019-06-16 ubuntu 安装百度云客户端
2019-06-16 OSG Qt Widget加载三维模型
2018-06-16 解析IFC数据并存储到关系型数据库
2017-06-16 使用R语言绘制图表