def flags(self, index): if not index.isValid(): return Qt.ItemIsEnabled column = index.column() if column in (MOD1, MOD2, MOD3, KEY): return Qt.ItemFlags( QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable) else: return Qt.ItemFlags(QAbstractTableModel.flags(self, index))
def flags(self, index): """Override Qt method""" if not index.isValid(): return Qt.ItemIsEnabled column = index.column() if column in [0]: return Qt.ItemFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable | Qt.ItemIsUserCheckable | Qt.ItemIsEditable) else: return Qt.ItemFlags(Qt.ItemIsEnabled)
def flags(self, index): """Set flags""" if index.column() == 0: return Qt.ItemIsEnabled | Qt.ItemIsSelectable return Qt.ItemFlags( QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable)
def flags(self, index): """Qt Override.""" if not index.isValid(): return Qt.ItemIsEnabled return Qt.ItemFlags(QAbstractTableModel.flags(self, index))
def flags(self, index): """Set editable flag""" if not index.isValid(): return Qt.ItemIsEnabled return Qt.ItemFlags( QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable)