I have this Glade file:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkApplicationWindow" id="Foobar">
<property name="name">Foobar</property>
<property name="width-request">800</property>
<property name="height-request">600</property>
<property name="can-focus">False</property>
<property name="decorated">False</property>
<property name="show-menubar">False</property>
[...]
</object>
</interface>
And I try to read it using gtkmm like this:
m_refBuilder = Gtk::Builder::create();
m_refBuilder->create_from_file("main.glade");
auto foobar = Glib::RefPtr<Gtk::ApplicationWindow>::cast_dynamic(m_refBuilder->get_object("Foobar"));
However, get_object
always return a nullptr. Am I doing something wrong, or using the wrong field somewhere?