擅长:python、mysql、java
<p>您应该能够通过GtkTreePath,可能是一个黑客,但仍然在API中:</p>
<pre><code>GtkTreePath *path;
GtkTreeIter iter;
/* With NULL as iter, we get the number of toplevel nodes. */
gint rows = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(model), NULL);
/* Now get a path from the index. */
path = gtk_tree_path_new_from_indices(rows - 1, -1);
/* Ask the model for an iter to the node identified by the path. */
gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path);
/* Drop the path, we're done with it, iter is final output. */
gtk_tree_path_free(path);
</code></pre>
<p>注意:我在编写上面的代码时还没有测试过,但是我很确定我在实际代码中做了一些非常类似的事情。在</p>