jgillich
jgillich

Reputation: 76209

Python & GTK3: How to create a Liststore

In PyGtk I always used this to create a ListStore with an Image (using it with an IconView for displaying files):

store = gtk.ListStore(str, gtk.gdk.Pixbuf, bool)

But I can't figure out how to do this with Python 3 and PyGObject.

Upvotes: 5

Views: 1121

Answers (1)

ptomato
ptomato

Reputation: 57870

Here's how:

from gi.repository import Gtk, GdkPixbuf
store = Gtk.ListStore(str, GdkPixbuf.Pixbuf, bool)

Upvotes: 8

Related Questions