5

在 PyGtk 中,我总是使用它来创建一个带有 Image 的 ListStore(将它与 IconView 一起用于显示文件):

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

但我不知道如何用 Python 3 和 PyGObject 做到这一点。

4

1 回答 1

8

就是这样:

from gi.repository import Gtk, GdkPixbuf
store = Gtk.ListStore(str, GdkPixbuf.Pixbuf, bool)
于 2011-09-13T05:36:02.420 回答