summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-08-31 12:03:44 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-08-31 12:03:44 (GMT)
commitaec1d2b85b3a818350b70bbb27790dee6ac35327 (patch)
treeab37d5df921ee1c4ca09b9d582ddf562c3fef8c1 /doc
parent2192d722a0b2af2aae0a8c45741f1ee4fd28269c (diff)
parent500e4d4a7faef619354cb92b6bf7df6a639d29e3 (diff)
downloadQt-aec1d2b85b3a818350b70bbb27790dee6ac35327.zip
Qt-aec1d2b85b3a818350b70bbb27790dee6ac35327.tar.gz
Qt-aec1d2b85b3a818350b70bbb27790dee6ac35327.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/extending.qdoc14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 5c4d5e7..6388764 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -965,6 +965,20 @@ Item {
}
\endcode
+This may be connected to via QObject::connect() or called directly from C++ using
+QMetaObject::invokeMethod():
+
+\code
+ QDeclarativeEngine engine;
+ QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext());
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile("main.qml"));
+ QObject *object = component.create(context);
+ QVariant str("Hello");
+ QMetaObject::invokeMethod(object, "say", Q_ARG(QVariant, str));
+\endcode
+
+Return values of type QVariant are also supported via Q_RETURN_ARG.
+
\section1 Defining new Components
\target components