From 3b39e0d541ed3f18441420228f1270bd167fa7fa Mon Sep 17 00:00:00 2001 From: James Westman Date: Thu, 21 Apr 2022 11:47:25 -0500 Subject: [PATCH] docs: Document how to reference a template object --- docs/examples.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/examples.rst b/docs/examples.rst index bf28784..4d9c1cd 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -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 ----------