title: Show icon or color in Gtk TreeView tree
body: <p>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:</p>
  
  <p><img src="https://i.stack.imgur.com/iGVqv.png" alt="enter image description here"></p>
  
  <p>My code looks like this but does not load the icon.png file in the same directory:</p>
  
  <pre><code>#!/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.ListStore(GdkPixbuf.Pixbuf, str)
          self.treeview = Gtk.TreeView(model=self.liststore)
  
          symbol1 = GdkPixbuf.Pixbuf.new_from_file("icon.png")
          self.liststore.append([symbol1, "This is a symbol1"])
  
          symbol2 = Gtk.IconTheme.get_default().load_icon("gtk-cut", 64, 0)
          self.liststore.append([symbol2, "This is symbol2"])
  
          px_renderer = Gtk.CellRendererPixbuf()
          px_column = Gtk.TreeViewColumn("Icon", px_renderer)
          self.treeview.append_column(px_column) 
  
          str_renderer = Gtk.CellRendererText()
          str_column = Gtk.TreeViewColumn("Name", str_renderer, text=1)
          self.treeview.append_column(str_column)
  
          self.add(self.treeview)
  
  win = MyWindow()
  win.connect("delete-event", Gtk.main_quit)
  win.show_all()
  Gtk.main()
  </code></pre>
  
  <p>The documentation for GTK3 pixbuf is here:</p>
  
  <ul>
  <li><a href="https://lazka.github.io/pgi-docs/index.html#GdkPixbuf-2.0/classes/Pixbuf.html" rel="noreferrer">https://lazka.github.io/pgi-docs/index.html#GdkPixbuf-2.0/classes/Pixbuf.html</a></li>
  </ul>
  
  <p>Older examples for PyGTK are here, but something has really changed in how this is handled:</p>
  
  <ul>
  <li><a href="http://faq.pygtk.org/index.py?file=faq13.006.htp&amp;req=show" rel="noreferrer">http://faq.pygtk.org/index.py?file=faq13.006.htp&amp;req=show</a></li>
  <li><a href="http://www.daa.com.au/pipermail/pygtk/2003-August/005644.html" rel="noreferrer">http://www.daa.com.au/pipermail/pygtk/2003-August/005644.html</a></li>
  </ul>