mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
docs: Document how to reference a template object
This commit is contained in:
parent
f77550413c
commit
3b39e0d541
1 changed files with 14 additions and 0 deletions
|
@ -83,6 +83,20 @@ In this example, we create a class called ``MyAppWindow`` that inherits from
|
||||||
my-custom-property: 3.14;
|
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
|
Properties
|
||||||
----------
|
----------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue