Buttons_QCheckBox_01_change_state.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:OpenTutorials_PyQt 作者: RavenKyu 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号