diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-11-05 11:33:00 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-11-10 22:43:40 +0100 |
commit | 5b8d4517fabda5713a4023b9692ff5fe77162237 (patch) | |
tree | 5d2cefeab80378db9798e86194548f95b748475a /examples/declarative/referenceexamples/methods/doc | |
parent | 20fee1eb56f64ecc6d356abe658da14d09e7d09a (diff) |
Add the 'methods' example of the QML reference examples
Task-number: PYSIDE-841
Pick-to: 6.2
Change-Id: I99a592e6a9c347c46dd9bb86a9e925d0f70c34c6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/declarative/referenceexamples/methods/doc')
-rw-r--r-- | examples/declarative/referenceexamples/methods/doc/methods.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/declarative/referenceexamples/methods/doc/methods.rst b/examples/declarative/referenceexamples/methods/doc/methods.rst new file mode 100644 index 000000000..bda2ede5a --- /dev/null +++ b/examples/declarative/referenceexamples/methods/doc/methods.rst @@ -0,0 +1,15 @@ +.. _qml-methods-example: + +Extending QML - Methods Example +=============================== + +This example builds on the :ref:`qml-adding-types-example`, +the :ref:`qml-object-and-list-property-types-example` and +the :ref:`qml-inheritance-and-coercion-example`. + +The Methods Example has an additional method in the ``BirthdayParty`` class: +``invite()``. ``invite()`` is decorated with ``@Slot`` so that it can be +called from QML. + +In ``example.qml``, the ``invite()`` method is called +in the ``QtQml.Component.completed()`` signal handler. |