3种状态 为选中0 半选中1 选中2 def initUI(self): self.setWindowTitle('QCheckBoxDemo') self.setGeometry(500,500,300,200) checkBox1 =