diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2016-10-18 16:35:50 +0200 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@theqtcompany.com> | 2016-10-20 08:57:38 +0000 |
commit | 69663871fcb9d0e5b508e7da173604bdd1a3a65f (patch) | |
tree | 681d9b71fd521a60ea3a70d1fb0710ea6df8907e | |
parent | 2c8087d9baf475cc9cf3bfd3fef1807691b28a08 (diff) | |
download | qt-creator-69663871fcb9d0e5b508e7da173604bdd1a3a65f.tar.gz |
Update documentation for connections editor
We added a new tab called backends.
I also updated all the screenshot, so they
contain the new tab.
Change-Id: Ib66ffbd3a48383f621a482241cde12caef9ca7b4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r-- | doc/images/qmldesigner-backends.png | bin | 0 -> 3632 bytes | |||
-rw-r--r-- | doc/images/qmldesigner-bindings.png | bin | 4919 -> 3378 bytes | |||
-rw-r--r-- | doc/images/qmldesigner-connections.png | bin | 4606 -> 3299 bytes | |||
-rw-r--r-- | doc/images/qmldesigner-dynamicprops.png | bin | 4953 -> 3414 bytes | |||
-rw-r--r-- | doc/src/qtquick/qtquick-connection-editor.qdoc | 51 | ||||
-rw-r--r-- | doc/src/qtquick/qtquick-modules-with-plugins.qdoc | 3 |
6 files changed, 54 insertions, 0 deletions
diff --git a/doc/images/qmldesigner-backends.png b/doc/images/qmldesigner-backends.png Binary files differnew file mode 100644 index 0000000000..b3e4a23d1b --- /dev/null +++ b/doc/images/qmldesigner-backends.png diff --git a/doc/images/qmldesigner-bindings.png b/doc/images/qmldesigner-bindings.png Binary files differindex ebe24eb758..c3a90cc3c7 100644 --- a/doc/images/qmldesigner-bindings.png +++ b/doc/images/qmldesigner-bindings.png diff --git a/doc/images/qmldesigner-connections.png b/doc/images/qmldesigner-connections.png Binary files differindex 6548e88e90..165385d9b2 100644 --- a/doc/images/qmldesigner-connections.png +++ b/doc/images/qmldesigner-connections.png diff --git a/doc/images/qmldesigner-dynamicprops.png b/doc/images/qmldesigner-dynamicprops.png Binary files differindex 04949ac681..ae2125481a 100644 --- a/doc/images/qmldesigner-dynamicprops.png +++ b/doc/images/qmldesigner-dynamicprops.png diff --git a/doc/src/qtquick/qtquick-connection-editor.qdoc b/doc/src/qtquick/qtquick-connection-editor.qdoc index 886359d03b..92062021cf 100644 --- a/doc/src/qtquick/qtquick-connection-editor.qdoc +++ b/doc/src/qtquick/qtquick-connection-editor.qdoc @@ -41,6 +41,8 @@ \li Create bindings between the properties of two objects. + \li Manage backend QObjects. + \endlist For examples of adding connections, see @@ -125,4 +127,53 @@ \endlist + \section1 Managing C++ Backend Objects + + Many applications provide QObject objects implemented in C++ that work as a + bridge between QML and C++. Such objects are typically registered with + qmlRegisterType or qmlRegisterSingletonType and then used by QML to + communicate with the C++ backend. Another example of such objects are the + state machines created by the \l {Using the Qt SCXML Compiler (qscxmlc)} + {Qt SCXML Compiler}. + + Backend objects in a QML file are accessible if the QML file contains the + required imports. In addition, for a non-singleton QObject, a dynamic + property that contains the QObject must be specified. + + A \e local QObject is instantiated in the current \e .qml file, as follows: + + \badcode + property MyType myType: MyType {}. + \endcode + + Otherwise the property is just defined, as follows: + + \badcode + property MyType myType + \endcode + + To manage backend objects: + + \list 1 + + \li Select the \uicontrol Backends tab to view accessible backend + objects. + + \image qmldesigner-backends.png + + \li Select the \inlineimage plus.png + (\uicontrol Add) button to add a backend object in the + \uicontrol {Add New C++ Backend} dialog. + + \li In the \uicontrol Type field, select the type of the backend QObject + to add. + + \li Select the \uicontrol {Define object locally} check box if the + QObject is not registered as a singleton. + + \li Select \uicontrol OK to add the required import and to create the + property for a non-singleton object. + + \endlist + */ diff --git a/doc/src/qtquick/qtquick-modules-with-plugins.qdoc b/doc/src/qtquick/qtquick-modules-with-plugins.qdoc index de636b6636..c2def1cdc7 100644 --- a/doc/src/qtquick/qtquick-modules-with-plugins.qdoc +++ b/doc/src/qtquick/qtquick-modules-with-plugins.qdoc @@ -52,6 +52,9 @@ is available, and therefore, you must explicitly generate type information for QML modules with plugins before distributing them. + Classes registered with \c qmlRegisterType() can be used as backend objects + in the \QMLD. For more information, see \l {Adding Connections}. + Ideally, QML modules have a \c{plugins.qmltypes} file in the same directory as the \c qmldir file. The \c qmltypes file contains a description of the types exported by the module's plugins and is loaded by \QC when the |