1

I have a TreeStore with objects that I view and manipulate through a GtkTreeView/GtkTreeModel setup.

I also have a TreeView showing a TreeModelSort of the TreeStore, which I use for sorting on columns like name and date.

The problem is, that the sort mechanism only sorts the root nodes, even if a underlying child node has e.g. a date that is later/sooner than the roo tnodes' dates.

So, the question is if there is any way to show the objects as a List, not a tree, but keeping the references to the paths in the other TreeView?

4

1 回答 1

1

我建议使用 TreeModelFilter 过滤掉任何作为子行的行(即深度 > 1)。您可以过滤已排序的模型,并仅显示根节点。

于 2009-08-26T20:48:40.740 回答