Example #1
0
 def flags(self, index):
     if not index.isValid():
         return Qt.ItemIsEnabled
     return Qt.ItemFlags(QAbstractListModel.flags(self, index)|Qt.ItemIsUserCheckable)
Example #2
0
 def flags(self, index):
     if index.isValid():
         return QAbstractListModel.flags(self, index) | Qt.ItemIsUserCheckable
     return QAbstractListModel.flags(self, index)
Example #3
0
 def flags(self, index):
     if index.column() == 0:
         return QAbstractListModel.flags(self, index) | Qt.ItemIsEditable
     return QAbstractListModel.flags(self, index)
Example #4
0
 def flags(self, index):
     defaultFlags = QAbstractListModel.flags(self, index)
     if index.isValid():
         return Qt.ItemIsDragEnabled | defaultFlags
     else:
         return defaultFlags
Example #5
0
 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
Example #6
0
 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)
Example #8
0
 def flags(self, modelindex):
     return QAbstractListModel.flags(self, modelindex) | Qt.ItemIsEditable