diff options
Diffstat (limited to 'examples/qml/referenceexamples/methods/doc/methods.rst')
-rw-r--r-- | examples/qml/referenceexamples/methods/doc/methods.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/qml/referenceexamples/methods/doc/methods.rst b/examples/qml/referenceexamples/methods/doc/methods.rst new file mode 100644 index 000000000..bda2ede5a --- /dev/null +++ b/examples/qml/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. |