您需要将处理程序连接到pressedsignal梳子o’s
view:
self.ui.comboBox.view().pressed.connect(self.handleItemPressed) ... def handleItemPressed(self, index): item = self.ui.comboBox.model().itemFromIndex(index) if item.checkState() == QtCore.Qt.Checked: item.setCheckState(QtCore.Qt.Unchecked) else: item.setCheckState(QtCore.Qt.Checked)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)