Add tests for nested templates

Basically just a copy of the list_factory test, but with an extra copy
of the list factory inside it.
This commit is contained in:
Tom Greig 2025-03-30 10:27:11 +01:00
parent f93d5d2acd
commit cc09f3d3bb
3 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,17 @@
using Gtk 4.0;
Gtk.ListView {
factory: Gtk.BuilderListItemFactory list_item_factory {
template ListItem {
child: Gtk.ListView {
factory: Gtk.BuilderListItemFactory list_item_factory {
template ListItem {
child: Gtk.Label {
label: bind template.item as <$MyObject>.name;
};
}
};
};
}
};
}