How to set background from image file in pygtk+ 3 ? I tried with this but all the rest items in the application goes above it or below the image. I can change the bg colour with Gdk, but I want to see my custom made image in the background of the application.
image = Gtk.Image()
image.set_from_file("image.png")
self.add(image)
Three possibilities:
Gtk.Overlay
and put your image widget under the other widgets in the window do_draw
function and render the background using Cairo before chaining up to the parent's implementation of do_draw
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.