Custom widget GtkBuilder?

Hello, I am using a minor language binding to develop an UI.
I decided to use GtkBuilder to lessen the work of making UIs, and directly hit with the problem: my custom widget is not being recognized.

Since my language binding is quite niche, I’d like to ask how it is done in C.
Does the widget need to be available in the symbol table in specific way?
Or is there some place to register my widget for GtkBuilder?
Thanks in advance.

1 Like

Met the same trouble too:
How to load properties from UI XML via GtkBuilder?

Hello, any guidance on how to make custom widget gtkbuilder-compatible?

You need to call g_type_ensure (MY_TYPE_NAME); before calling gtk_widget_init_template ();

Here’s an example from libadwaita.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.