1
我想知道是否有可能在一个公共模型上有多个视图,其中每个视图的根索引是Qt公共模型中的任意索引? 这可以用某种代理模型来实现吗?模型的任意索引作为Qt中视图的根索引?
E.g.
source model:
root
-A
-1
-2
-B
-3
-4
Tree View:
-A
-1
-2
-B
-3
-4
List View1 (using index A as root):
-1
-2
List View2 (using index B as root):
-3
-4
编辑:所以它似乎我试图实现的功能可以通过QTreeView.setRootIndex()来实现。不幸的是,QDeclarativeView不提供此功能(还?)。