I have very strange problem with gtk.Image(). Simple question; how to update image? On window creation I create image and pack it… On that time I load image from disk. Now I start downloading image from url, and when it's done I just want to replace existing image with new one. I rewrite content of same file on disk and then do:
pixbuf = gtk.gdk.pixbuf_new_from_file(image_path)
self._user_avatar.set_from_pixbuf(pixbuf)
I have tried self._user_avatar.set_from_file(image_path) and self._user_avatar.clear() nothing works. When i restart app there is a new image and everything is ok.
gtk.Image.set_from_pixbuf
is the right method, so your problem may come from something else. Try on the most simple piece of code to reproduce your problem.Here's a working sample: