docs: Document how to reference a template object

This commit is contained in:
James Westman 2022-04-21 11:47:25 -05:00
parent f77550413c
commit 3b39e0d541
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6

View file

@ -83,6 +83,20 @@ In this example, we create a class called ``MyAppWindow`` that inherits from
my-custom-property: 3.14;
}
Referencing a template object
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you want to use a template object elsewhere in your blueprint, you can use
the template class name as the object ID:
.. code-block::
template MyAppWindow : ApplicationWindow { }
Gtk.Label {
visible: bind MyAppWindow.visible;
}
Properties
----------