【问题标题】:how do I check and uncheck all checkbox in python?如何检查和取消选中python中的所有复选框?
【发布时间】:2015-04-09 08:01:56
【问题描述】:

如何选择所有的复选框

 qbuttongroup

在 python 中?

    self.group = QtGui.QButtonGroup() 

【问题讨论】:

    标签: python pyqt qcheckbox qbuttongroup


    【解决方案1】:

    使用buttons() 方法迭代它们:

    def setAllButtonsChecked(self, checked=True)
        for button in self.group.buttons():
            button.setChecked(checked)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-29
      • 1970-01-01
      • 1970-01-01
      • 2014-05-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多