def flags(self, index): if not index.isValid(): return Qt.ItemIsEnabled return Qt.ItemFlags(QAbstractListModel.flags(self, index)|Qt.ItemIsUserCheckable)
def flags(self, index): if index.isValid(): return QAbstractListModel.flags(self, index) | Qt.ItemIsUserCheckable return QAbstractListModel.flags(self, index)
def flags(self, index): if index.column() == 0: return QAbstractListModel.flags(self, index) | Qt.ItemIsEditable return QAbstractListModel.flags(self, index)
def flags(self, index): defaultFlags = QAbstractListModel.flags(self, index) if index.isValid(): return Qt.ItemIsDragEnabled | defaultFlags else: return defaultFlags
def flags(self, index): defaultFlags = QAbstractListModel.flags(self, index) if index.isValid() and index.column() == 0: return Qt.ItemIsDragEnabled | defaultFlags else: return Qt.ItemIsDropEnabled | defaultFlags
def flags(self, index): # return (QAbstractTableModel.flags(self, index)|Qt.ItemIsEditable) return (QAbstractListModel.flags(self, index) | Qt.ItemIsEditable)
def flags(self, index): if not index.isValid(): return Qt.ItemIsEnabled return Qt.ItemFlags(QAbstractListModel.flags(self, index)|Qt.ItemIsUserCheckable)
def flags(self, modelindex): return QAbstractListModel.flags(self, modelindex) | Qt.ItemIsEditable