Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 PyGtk 中,我总是使用它来创建一个带有 Image 的 ListStore(将它与 IconView 一起用于显示文件):
store = gtk.ListStore(str, gtk.gdk.Pixbuf, bool)
但我不知道如何用 Python 3 和 PyGObject 做到这一点。
就是这样:
from gi.repository import Gtk, GdkPixbuf store = Gtk.ListStore(str, GdkPixbuf.Pixbuf, bool)