个人网站建设流程 域名注册的选择,石家庄网络公司招聘信息,从化区建设局网站,wordpress清除所有评论锋哥原创的PyQt6视频教程#xff1a;
2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~共计33条视频#xff0c;包括#xff1a;2024版 PyQt6 Python桌面开发 视频教程(无废话…锋哥原创的PyQt6视频教程
2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~共计33条视频包括2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~、第2讲 PyQt6库和工具库QTDesigner安装与配置、第3讲 PyQt6第一个程序HelloWorld实现等UP主更多精彩视频请关注UP账号。https://www.bilibili.com/video/BV11C4y1P7fj/
QCheckBox是复选框控件它用来表示是否选取了某个选项条件常用于为用户提供具有是否或真假值的选项。
QCheckBox控件的使用与QRadioButton控件类似但它是为用户提供“多选多”的选择另外它除了选中和未选中两种状态之外还提
供了第三种状态半选中。如果需要第三种状态需要使用QCheckBox类的setTristate()方法使其生效并且可以使用checkState()方法查询当前状态。
CheckBox控件的三种状态值及说明
方法说明QT.Checked选中QT.PartiallyChecked半选中QT.Unchecked未选中 参考代码
# Form implementation generated from reading ui file QCheckBox复选框按钮控件.ui
#
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.from PyQt6 import QtCore, QtGui, QtWidgetsclass Ui_Form(object):def setupUi(self, Form):Form.setObjectName(Form)Form.resize(400, 300)self.checkBox QtWidgets.QCheckBox(parentForm)self.checkBox.setGeometry(QtCore.QRect(100, 110, 80, 19))self.checkBox.setTristate(True)self.checkBox.setObjectName(checkBox)self.checkBox_2 QtWidgets.QCheckBox(parentForm)self.checkBox_2.setGeometry(QtCore.QRect(100, 140, 80, 19))self.checkBox_2.setObjectName(checkBox_2)self.checkBox_3 QtWidgets.QCheckBox(parentForm)self.checkBox_3.setGeometry(QtCore.QRect(100, 170, 80, 19))self.checkBox_3.setObjectName(checkBox_3)self.label QtWidgets.QLabel(parentForm)self.label.setGeometry(QtCore.QRect(100, 80, 121, 16))self.label.setObjectName(label)self.retranslateUi(Form)QtCore.QMetaObject.connectSlotsByName(Form)def retranslateUi(self, Form):_translate QtCore.QCoreApplication.translateForm.setWindowTitle(_translate(Form, Form))self.checkBox.setText(_translate(Form, 看电影))self.checkBox_2.setText(_translate(Form, 踢足球))self.checkBox_3.setText(_translate(Form, 唱歌))self.label.setText(_translate(Form, 您的爱好有哪些))