def __init__(self):
QWidget.__init__(self, flags=Qt.Widget)
self.setWindowTitle("CheckBox")
base_layout = QBoxLayout(QBoxLayout.TopToBottom, self)
self.setLayout(base_layout)
# ??? ?? ?? ??
self.lb = QLabel()
base_layout.addWidget(self.lb)
# CheckBox ?? ?? ? ??? ??
self.cb_list = list()
for i in range(2):
w = QCheckBox("CheckBox %s" % i)
w.stateChanged.connect(self._confirm)
base_layout.addWidget(w)
self.cb_list.append(w)
# ?? ?? ??? ??
self._confirm()
Buttons_QCheckBox_01_change_state.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录