I am trying to create a Button in Gtk4.0 and the button should have an Icon and a Label.
But when I set the Label, the image will be deleted, and when i set the image (via btn.set_icon_name
) then the label will be deleted.
After a bit of research, i found out that this is how it is suposed to work : (developer-old.gnome.org)
Adds a GtkImage with the given icon name as a child. If button already contains a child widget, that child widget will be removed and replaced with the image.
I found this on Stackoverflow: Python GTK3 button with image and label, and I'm sure that it works fine in Gtk 3.0 but I am using Gtk 4.0
Where is the Gtk.Button.set_always_show_image(True) Method in Gtk 4.0?