Extending QML - Methods Example#
Methods Support.
This example builds on:
The Methods Example has an additional method in the BirthdayParty
class: invite()
. invite()
is declared with Q_INVOKABLE
so that it can be called from QML.
<Code snippet "referenceexamples/methods/birthdayparty.h:0" not found>
In example.qml
, the invite()
method is called in the onCompleted
signal handler:
<Code snippet "referenceexamples/methods/example.qml:0" not found>