问题描述
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 ++链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!