DAG(有向无环图)-QAbstractItemModel [英] DAG (Directed acyclic graph) - QAbstractItemModel
问题描述
我打算在pyqt中创建一个节点图. qt提供了用于1D,2D和Tree数据的抽象模型,但是抽象类似乎因节点图而崩溃.
尤其是QAbstractModel中的父"函数返回单个父对象的QModelIndex.在DAG中,我可能会有多个父母.
我发现的一个资源是此博客文章:
http://invalidmagic.wordpress.com /2009/12/10/qgraphicsscene-us-as-a-qabstractitemmodel/
它提供了一些有用的信息,但我似乎无法确定该模型如何表示多亲的概念.
我正在寻找有关如何在Qt中实现DAG模型的示例和建议.
此线程名为
One resource I found was this blog post: http://invalidmagic.wordpress.com/2009/12/10/qgraphicsscene-used-as-a-qabstractitemmodel/ It provides some useful information, but I can't seem figure how the model represents the concept of multiple parents. I'm looking for examples and suggestions for how to implement a DAG model in Qt. This thread entitled QTreeView display of graph (multiple parents of item) is an interesting resource that you can consider (It also addresses using 这篇关于DAG(有向无环图)-QAbstractItemModel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!QAbstractItemModel
for the case).