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): 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 __init__(self): QAbstractTableModel.__init__(self) self.shortcuts = []