예제 #1
0
 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))
예제 #2
0
 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)
예제 #3
0
 def flags(self, index):
     """Set flags"""
     if index.column() == 0:
         return Qt.ItemIsEnabled | Qt.ItemIsSelectable
     return Qt.ItemFlags(
         QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable)
예제 #4
0
 def flags(self, index):
     """Qt Override."""
     if not index.isValid():
         return Qt.ItemIsEnabled
     return Qt.ItemFlags(QAbstractTableModel.flags(self, index))
예제 #5
0
 def flags(self, index):
     """Set editable flag"""
     if not index.isValid():
         return Qt.ItemIsEnabled
     return Qt.ItemFlags(
         QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable)