Iterating through a ListModel
- From: "Joe Van Dyk" <joevandyk gmail com>
- To: gtkmm-list gnome org
- Subject: Iterating through a ListModel
- Date: Sat, 3 Jun 2006 03:59:56 -0700
Gtk::TreeNodeChildren children = list_store->children();
for (Gtk::TreeIter iter = children.begin(); iter != children.end(); ++iter)
{
Gtk::TreeRow row = *iter;
// Now I can use row[something]
}
I don't like having to convert the TreeIter to a TreeRow. Using a
TreeRow seems to make the code much nicer to read. Is there a way I
can eliminate the two-step process of getting a TreeRow?
Thanks,
Joe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]