开发者

Python & GTK3: How to create a Liststore

开发者 https://www.devze.com 2023-04-04 23:05 出处:网络
In PyGtk I always used this to create a ListStore开发者_Python百科 with an Image (using it with an IconView for displaying files):

In PyGtk I always used this to create a ListStore开发者_Python百科 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.


Here's how:

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号