Hello there ! I was building a python-GTK app for a personal project and was using something like Cambalache to make a GTKXml definition for the interface.
However, when trying to build a template class (using a constructor), the only thing returned was “Invalid Object type ‘AdwHeaderBar’”, and the program crashes. Did I mess up something in the environment ?
You’re overriding startup to show the window: that’s wrong.
You need to override do_activate, not do_startup, to create and/or show the main application window; startup is called only once. Additionally, if you override do_startup() then you must chain up to the parent’s implementation. AdwApplication will initialise libadwaita inside the base class startup implementation.