我知道这个问题存在于How to add an image to a button with GTK中,但是gtk_button_set_image在gtk4中被弃用了。
发布于 2021-01-18 21:01:58
其中gtk_button_set_child (GTK_BUTTON (button), image);和image分别为GtkButton和GtkImage。
发布于 2021-11-05 14:08:05
Gtk.Box box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 5);
box.prepend(new Image.from_icon_name("media-playback-start"));
box.append(new Gtk.Label("Play"));
button.child = box;https://stackoverflow.com/questions/65764433
复制相似问题