blob: fe7469bd6d698ee2a0ed2691e5ba32246b59071a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Extending QML - Methods Example
===============================
This example builds on the :ref:`example_qml_tutorials_extending-qml-advanced_adding`,
the :ref:`example_qml_tutorials_extending-qml-advanced_properties` and
the :ref:`example_qml_tutorials_extending-qml-advanced_advanced2-inheritance-and-coercion`.
The Methods Example has an additional method in the ``BirthdayParty`` class:
``invite()``. ``invite()`` is decorated with :deco:`~PySide6.QtCore.Slot` so that it can be
called from QML.
In ``example.qml``, the ``invite()`` method is called
in the ``QtQml.Component.completed()`` signal handler.
|