小编Edg*_*mez的帖子

如何使用GTK将图像添加到按钮

我试图将图像添加到带标签的按钮,但图像不显示,破碎的图像也不显示.

stop_button = gtk_button_new_with_label("stop");
image = gtk_image_new_from_file ("/home/cendit/Escritorio/index.jpeg");
gtk_button_set_image (GTK_BUTTON(stop_button),image);
Run Code Online (Sandbox Code Playgroud)

我尝试了另一条路径"file:///home/cendit/Escritorio/index.jpeg",但没有成功.

c++ linux-mint gtk3

2
推荐指数
1
解决办法
4121
查看次数

标签 统计

c++ ×1

gtk3 ×1

linux-mint ×1