示例#1
0
 def flags(self, index):
     """
     return the item flags
     """
     if not index.isValid():
         return Qt.ItemIsEnabled
     return Qt.ItemFlags(QAbstractTableModel.flags(self, index))
示例#2
0
 def flags(self, index):
     ans = QAbstractTableModel.flags(self, index)
     return ans | Qt.ItemIsUserCheckable
示例#3
0
 def flags(self, index):
     col = index.column()
     ans = QAbstractTableModel.flags(self, index)
     if col == 0:
         return ans | Qt.ItemIsUserCheckable
     return Qt.ItemIsEditable | ans
示例#4
0
文件: emailp.py 项目: Eksmo/calibre
 def flags(self, index):
     if index.column() == 3:
         return QAbstractTableModel.flags(self, index) | Qt.ItemIsUserCheckable
     else:
         return QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable
示例#5
0
 def flags(self, index):
     flags = QAbstractTableModel.flags(self, index)
     if index.isValid():
         if index.row() == 0:
             flags |= Qt.ItemIsDropEnabled
     return flags
示例#6
0
 def flags(self, index):
     ans = QAbstractTableModel.flags(self, index)
     return ans | Qt.ItemIsUserCheckable
示例#7
0
 def flags(self, index):
     col = index.column()
     ans = QAbstractTableModel.flags(self, index)
     if col == 0:
         return ans | Qt.ItemIsUserCheckable
     return Qt.ItemIsEditable | ans
示例#8
0
 def flags(self, index):
     if index.column() == 3:
         return QAbstractTableModel.flags(self,
                                          index) | Qt.ItemIsUserCheckable
     else:
         return QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable
 def flags(self, index):
     flags = QAbstractTableModel.flags(self, index)
     flags |= Qt.ItemIsEditable
     return flags