Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从我的代码中访问GtkApplicationWindow对象对我很有用,但我想使用 Glade 来初始化它的属性。
如何在 Glade 中创建 GtkApplicationWindow 小部件?
在您的 ui xml 更改中
<object class="GtkWindow" id="foo">
到
<object class="GtkApplicationWindow" id="foo">
并通过 gtk builder 检索窗口后设置应用程序属性:
GTK_WINDOW (gtk_builder_get_object (xml, "foo")); g_object_set(main_window, "application", application, NULL);