将Glade文件与程序g ++链接 [英] Linking glade file with program g++

查看:116
本文介绍了将Glade文件与程序g ++链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Glade文件和程序文件可能会有些混乱,当您希望程序可移植时,这将成为一个问题.有什么办法可以将程序与林间空地文件绑定?

Glade files and the program files can get a bit messy, this becomes a problem when you want your program to be portable. Is there any way to bind your program with your glade files?

源代码(未完成但正在运行的项目): https://github.com/caelwithcats/valuator

Source code (unfinished but working project): https://github.com/caelwithcats/valuator

推荐答案

您可以使用Gio Resources在应用程序中包含.glade文件的内容,然后使用GtkBuilder的add_from_resource()加载它们: https://developer.gnome.org/gtkmm-tutorial/stable /sec-gio-resource.html.en

You can use Gio Resources to include the contents of your .glade files in the application, and then use GtkBuilder's add_from_resource() to load them: https://developer.gnome.org/gtkmm-tutorial/stable/sec-gio-resource.html.en

这篇关于将Glade文件与程序g ++链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆