Gtk: How to add a click event to a CellRendererPixbuf in a Treeview?

257 Views Asked by At

I want to get a signal event if somebody click my pixbuf image? How is this possible.

treestore = Gtk.TreeStore()
...
treeview = Gtk.TreeView()
treeview.set_model(self.treestore)

renderer_pixbuf = Gtk.CellRendererPixbuf()
renderer_pixbuf.props.icon_name = 'list-add'
renderer_pixbuf.connect("clicked", self.start_event)  # doesn't work

column_pixbuf = Gtk.TreeViewColumn("Label", renderer_pixbuf)
treeview.append_column(column_pixbuf)

So what is the right way to get this feature?

0

There are 0 best solutions below