qttreepropertybrowser.py 文件源码

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

项目:QtPropertyBrowserV2.6-for-pyqt5 作者: theall 项目源码 文件源码
def mousePressEvent(self, event):
        super(QtPropertyEditorView, self).mousePressEvent(event)
        item = self.itemAt(event.pos())

        if item:
            if ((item != self.m_editorPrivate.editedItem()) and (event.button() == Qt.LeftButton)
                    and (self.header().logicalIndexAt(event.pos().x()) == 1)
                    and ((item.flags() & (Qt.ItemIsEditable | Qt.ItemIsEnabled)) == (Qt.ItemIsEditable | Qt.ItemIsEnabled))):
                self.editItem(item, 1)
            elif (not self.m_editorPrivate.hasValue(item) and self.m_editorPrivate.markPropertiesWithoutValue() and not self.rootIsDecorated()):
                if (event.pos().x() + self.header().offset() < 20):
                    item.setExpanded(not item.isExpanded())

## ------------ QtPropertyEditorDelegate
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号