From a0ed2b0ef3f9259f245294c59e6f4695f29caddd Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 21 Dec 2016 14:33:32 +0100 Subject: Doc: added specs to Extending QML - Methods Example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7386c2bd738776455a71bde8cffdcedb9e292b24 Reviewed-by: Venugopal Shivashankar Reviewed-by: Mitch Curtis Reviewed-by: Topi Reiniƶ --- examples/qml/doc/src/qml-extending.qdoc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'examples/qml/doc') diff --git a/examples/qml/doc/src/qml-extending.qdoc b/examples/qml/doc/src/qml-extending.qdoc index 0cb004be7d..b4174426a8 100644 --- a/examples/qml/doc/src/qml-extending.qdoc +++ b/examples/qml/doc/src/qml-extending.qdoc @@ -310,6 +310,15 @@ This example builds on: \li \l {Extending QML - Adding Types Example} \endlist +The Methods Example has an additional method in the \c BirthdayParty class: \c invite(). +\c invite() is declared with \l Q_INVOKABLE so that it can be +called from QML. + +\snippet referenceexamples/methods/birthdayparty.h 0 + +In \c example.qml, the \c invite() method is called in the \l [QML]{QtQml::Component::completed()}{Component.onCompleted} signal handler: + +\snippet referenceexamples/methods/example.qml 0 */ /*! -- cgit v1.2.3