def flags(self, index): if index.column() == 3: return QAbstractTableModel.flags( self, index) | Qt.ItemFlag.ItemIsUserCheckable else: return QAbstractTableModel.flags( self, index) | Qt.ItemFlag.ItemIsEditable
def flags(self, index): col = index.column() ans = QAbstractTableModel.flags(self, index) if col == 0: return ans | Qt.ItemFlag.ItemIsUserCheckable return Qt.ItemFlag.ItemIsEditable | ans