我有一个GtkListStore
,其中包含GtkTreeModelFilter
,以过滤掉某些行。然后我将此过滤器放在GtkTreeView
内。
这导致我的GtkTreeView
无法排序,因为GtkTreeModelFilter
未实现GtkTreeSortable
。
如何制作,以便我仍然可以对GtkTreeView
中的行进行排序?
答案 0 :(得分:2)
最简单的方法是在GtkTreeModelSort
周围包裹GtkTreeModelFilter
。然后将此包装器添加到GtkTreeView
。
总之,GtkListStore
内GtkTreeModelFilter
内的GtkTreeModelSort
内GtkTreeView
"com.sksamuel.elastic4s" %% "elastic4s-core" % Versions.elastic4s excludeAll ExclusionRule(organization = "org.apache.logging.log4j"),
// for the http client
"com.sksamuel.elastic4s" %% "elastic4s-http" % Versions.elastic4s excludeAll ExclusionRule(organization = "org.apache.logging.log4j"),
// for the tcp client
"com.sksamuel.elastic4s" %% "elastic4s-tcp" % Versions.elastic4s excludeAll ExclusionRule(organization = "org.apache.logging.log4j"),
// testing
"com.sksamuel.elastic4s" %% "elastic4s-testkit" % Versions.elastic4s % "test",
"com.sksamuel.elastic4s" %% "elastic4s-embedded" % Versions.elastic4s % "test",
"org.apache.logging.log4j" % "log4j-core" % "2.8.2" % "test",
"org.apache.logging.log4j" % "log4j-api" % "2.8.2" % "test",
。