summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-31 05:54:11 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-31 05:54:11 (GMT)
commitcf28f6cacf59d434072656af05466541ba69e8ae (patch)
treeee8cd94426004623da1abaea6861a5a214214688 /doc
parentb705fec8d093d06adbbd1baf461948b95a031759 (diff)
parent6a40104d587211dc740232fed908e29f0b58e2d9 (diff)
downloadQt-cf28f6cacf59d434072656af05466541ba69e8ae.zip
Qt-cf28f6cacf59d434072656af05466541ba69e8ae.tar.gz
Qt-cf28f6cacf59d434072656af05466541ba69e8ae.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Don't double call classBegin() Notify QML internal notifiers of item geometry changes before QML signal handlers. Revert "Add 'cached' property to Image." Add 'cached' property to Image. Ensure Flickable visibleArea is updated when view height changes Improve calling QML functions from C++ docs. Add missing license headers Remove debug. Snake: Don't use Behavior with states. QML Viewer should be put under QtDemos instead of QtExamples folder in Symbian app menu Fix application exiting in embedded qml examples QDeclarativeDebug: Destroy incoming connections if already connected Simplify type management code QML JavaScript .import parser Fix VisualDataModel model update handling when rootIndex is specified. Improve test reliability when running in parallel with other tests. Improve stability of test on loaded hw. Improve stability of test on loaded hw.
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