Iterating through a ListModel



 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]