Is there some simple way or how to integrate sqlite database into gtk.TreeModel (TreeView)?
What I want is to display data from a db in treeview, and it would be nice when I change something in db to see the change in treeview and the other way round.
Let’s say you put all your data in itemlist:
To get list of column properties, do:
To get only names of columns, you can then do:
Later you may need to set types in a ListStore for your TreeView, so do something like:
Then put all info from your database to a TreeView:
Now create columns for the TreeView (let’s say it’s called ‘tree’):
After that you should have automatically generated TreeView widget with correct columns and all the data. Source: Advanced widgets in PyGTK