jgi*_*ich 5 python pygobject gtk3
在PyGtk中,我总是使用它来创建一个带有Image的ListStore(使用它与IconView一起显示文件):
store = gtk.ListStore(str, gtk.gdk.Pixbuf, bool)
Run Code Online (Sandbox Code Playgroud)
但我无法弄清楚如何使用Python 3和PyGObject来做到这一点.
这是如何做:
from gi.repository import Gtk, GdkPixbuf
store = Gtk.ListStore(str, GdkPixbuf.Pixbuf, bool)
Run Code Online (Sandbox Code Playgroud)