[pygtk] treeView and pixbufs

marana at das.ufsc.br marana at das.ufsc.br
Thu Feb 8 21:45:17 WST 2007


    I have problems settung up a Gtk::TreeView with a column that can
    display a Glib::RefPtr<Gtk::Pixbuf>.

    On execution of my code the following error message appears for each
    row I insert into my Gtk::treeStore:

    (python.exe:2648): GLib-GObject-WARNING **: unable to set property
`pixbuf' of type `GdkPixbuf' from value of type `gchararray'

    The Gtk::TreeView is OK in my application but I miss the pixbufs.

    someone knows how to do it?


image = gtk.Image()
        image.set_from_file("D:\Users\EclipseWorkspace\InterfaceCTR\src\InterfaceTempoReal\image3.png")

        image.show()

        self.tree_store = gtk.TreeStore( str, gtk.gdk.Pixbuf , str )


        self.teste = 0
        self.parent = self.tree_store.append( None, ["Regions", gdk.stok,
None] )





More information about the pygtk mailing list