2011-09-13 16 views
5

In PyGTK ho sempre usato questo per creare un ListStore con un'immagine (di utilizzarlo con un IconView per i file di visualizzazione):Python & GTK3: Come creare un Liststore

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

Ma io non riesco a capire come farlo con Python 3 e PyGObject.

risposta

8

Ecco come:

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