Re: Iterating through a ListModel



Joe Van Dyk schrieb:
 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
What about

data = (*iter)[something];

?





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]