summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-09-01 11:20:14 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-09-01 11:20:14 (GMT)
commit61403e81d411b82e8a9ac5e3228267bf9ae0e8e1 (patch)
tree0562a4dcf0bcc5365f6cfe7a630f370ef3d471fc /doc/src/declarative
parent2e8419e43ce4d5be64bddf1b5b5f5ea9e28c55de (diff)
parent63129c8bd21bfdc8110680296bb3bc1ab5e43343 (diff)
downloadQt-61403e81d411b82e8a9ac5e3228267bf9ae0e8e1.zip
Qt-61403e81d411b82e8a9ac5e3228267bf9ae0e8e1.tar.gz
Qt-61403e81d411b82e8a9ac5e3228267bf9ae0e8e1.tar.bz2
Merge branch '4.7' into qmldocs
Conflicts: src/declarative/graphicsitems/qdeclarativetext.cpp src/declarative/graphicsitems/qdeclarativetextedit.cpp
Diffstat (limited to 'doc/src/declarative')
-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