Re: Number of rows in a Gtk::ListStore size?



Am Sat, 23 Feb 2008 12:53:53 +0100 schrieb Simon Fuhrmann:

> Use liststore->erase(liststore->children().end())

The hint was good, but I got a segfault. It worked that way:

    Gtk::TreeIter treeIt = m_refListModel->children ().end ();
    --treeIt; 

    m_refListModel->erase (treeIt);

The last element is the one before end() as in the STL containers. :-)

This may be dangerous, but works because I'm sure that list size is
never zero.

regards
Andreas


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