user1277330 user1277330 - 4 months ago 16x
Python Question

How to get a list of the elements in TreeView? PyGtk

I have a treeview, with some elements in it.
How can I get a list of all this data?
Is there something similar to this,



I'd say you get the model:

model = self.treeview.get_model()

And then you have tons of different ways to access your data/items depending on what you want and how the model look... For more on that check

You could get first row by doing:


And also you could iterate through it...