aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/tutorials/extending-qml-advanced/methods/doc/methods.rst
blob: bda2ede5a6fe3582dff8c25ebaee7bf0144a3d72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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.