summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-08-27 16:32:49 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-08-27 16:32:49 (GMT)
commit3ca305cf25033477b73121aa6622f8c9115285ec (patch)
tree59edd09384ffca0b5e68a777a032a9aa3f65a9df /doc/src/declarative
parent2cac8ca88c9b5b2f9d3040b1543d88ecee52da99 (diff)
parentd3b898e973662707f9644b4fe5f8d18849929723 (diff)
downloadQt-3ca305cf25033477b73121aa6622f8c9115285ec.zip
Qt-3ca305cf25033477b73121aa6622f8c9115285ec.tar.gz
Qt-3ca305cf25033477b73121aa6622f8c9115285ec.tar.bz2
Merge branch '4.7' into qmldocs
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/extending.qdoc17
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc10
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 3acfbdf..5c4d5e7 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -434,6 +434,23 @@ NOTIFY signal in C++.
See also \l {Extending types from QML}.
+\section1 Methods
+
+Slots and methods marked Q_INVOKABLE may be called as functions in QML.
+
+\snippet examples/declarative/cppextensions/referenceexamples/methods/example.qml 0
+
+In this example an invitation is added via an \c {invite()} invokable method of
+the BirthdayParty element. This function is available in QML by marking the \c {invite()}
+method with Q_INVOKABLE in the BirthdayParty class:
+
+\snippet examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.h 0
+
+\l {Extending QML - Methods Example} shows the complete code used to
+implement the invite() method.
+
+The \c {invite()} method is similarly available if it is declared as a slot.
+
\section1 Property Value Sources
\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 0
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index b4f4c83..f163a66 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -59,6 +59,16 @@
Equivalent to Q_DECLARE_METATYPE(TYPE) and Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>)
*/
+/*!
+ \macro QML_DECLARE_TYPEINFO(Type,Flags)
+ \relates QDeclarativeEngine
+
+ Declares additional properties of a type.
+
+ Current the only supported type info is \c QML_HAS_ATTACHED_PROPERTIES which
+ declares that the \c Type supports \l {Attached Properties}.
+*/
+
/*!
\fn int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)