treemodel.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:crispy 作者: mretegan 项目源码 文件源码
def flags(self, index):
        """Return the active flags for the given index. Add editable
        flag to items in the first colum or greater.
        """
        activeFlags = (Qt.ItemIsEnabled | Qt.ItemIsSelectable |
                       Qt.ItemIsUserCheckable)

        node = self.getNode(index)
        column = index.column()

        if column > 0 and not node.childCount():
            activeFlags = activeFlags | Qt.ItemIsEditable

        return activeFlags
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号