下面是实现的代码片段,不能执行,但方法有了。
GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
GtkTreeIter iter, tmp_iter;
gboolean valid;
valid = gtk_tree_model_get_iter_first(model, &iter);
while(valid)
{
tmp_iter = iter;
valid = gtk_tree_model_iter_next(model, &tmp_iter);//先判断是否到结尾
gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
}
阅读(3115) | 评论(0) | 转发(0) |