本文整理汇总了Python中PyQt4.QtCore.QAbstractListModel.flags方法的典型用法代码示例。如果您正苦于以下问题:Python QAbstractListModel.flags方法的具体用法?Python QAbstractListModel.flags怎么用?Python QAbstractListModel.flags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtCore.QAbstractListModel
的用法示例。
在下文中一共展示了QAbstractListModel.flags方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: flags
# 需要导入模块: from PyQt4.QtCore import QAbstractListModel [as 别名]
# 或者: from PyQt4.QtCore.QAbstractListModel import flags [as 别名]
def flags(self, index):
if index.column() == 0:
return QAbstractListModel.flags(self, index) | Qt.ItemIsEditable
return QAbstractListModel.flags(self, index)
示例2: flags
# 需要导入模块: from PyQt4.QtCore import QAbstractListModel [as 别名]
# 或者: from PyQt4.QtCore.QAbstractListModel import flags [as 别名]
def flags(self, index):
if index.isValid():
return QAbstractListModel.flags(self, index) | Qt.ItemIsUserCheckable
return QAbstractListModel.flags(self, index)
示例3: flags
# 需要导入模块: from PyQt4.QtCore import QAbstractListModel [as 别名]
# 或者: from PyQt4.QtCore.QAbstractListModel import flags [as 别名]
def flags(self, index):
defaultFlags = QAbstractListModel.flags(self, index)
if index.isValid():
return Qt.ItemIsDragEnabled | defaultFlags
else:
return defaultFlags
示例4: flags
# 需要导入模块: from PyQt4.QtCore import QAbstractListModel [as 别名]
# 或者: from PyQt4.QtCore.QAbstractListModel import flags [as 别名]
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
示例5: flags
# 需要导入模块: from PyQt4.QtCore import QAbstractListModel [as 别名]
# 或者: from PyQt4.QtCore.QAbstractListModel import flags [as 别名]
def flags(self, index):
if not index.isValid():
return Qt.ItemIsEnabled
return Qt.ItemFlags(QAbstractListModel.flags(self, index)|Qt.ItemIsUserCheckable)
示例6: flags
# 需要导入模块: from PyQt4.QtCore import QAbstractListModel [as 别名]
# 或者: from PyQt4.QtCore.QAbstractListModel import flags [as 别名]
def flags(self, modelindex):
return QAbstractListModel.flags(self, modelindex) | Qt.ItemIsEditable