Show icon or color in Gtk TreeView tree
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am having difficulty loading a file or displaying a colour in one of the columns of a Gtk TreeView (Python binding of GTK3). An example taken from QGIS shows a icon in the first row and a blue circle in the second row. The colour is taken from the layer properties: My code looks like this but does not load the icon.png file in the same directory: #!/usr/bin/python3 from gi.repository import Gtk, Gdk, GdkPixbuf class MyWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self) self.set_default_size(200, 200) self.liststore = Gtk