Wednesday, 14 August 2013

Python : sort a GTK treeview

Python : sort a GTK treeview

I can't wrap my head around the gtk.Treeview() list model.
From what I understand I have to wrap the lismodel in a
gtk.TreeModelSort() but when I do that, I can't access the listmodel
methods anymore..
lm = gtk.ListStore(object)
listmodel = gtk.TreeModelSort(lm)
for f in files:
listmodel.append([f])
return listmodel
AttributeError: 'gtk.TreeModelSort' object has no attribute 'append'
I'm working with this example (source): how would one make the table
sortable on every column?

No comments:

Post a Comment