diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-13 01:01:04 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-03-13 10:10:09 +0100 |
commit | 76be4abbbcfb2fbb14ce532413e0895198e7f0f1 (patch) | |
tree | 5d6ca9c4425df15a93b6f74dc8e4dbb38db74d91 /src/qml/doc | |
parent | 587d789fa5929f462b5744ba33a25db6c77b36fc (diff) | |
parent | 70d726e91e4ef27002b2271805de19077e25809c (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/qml/compiler/qv4codegen.cpp
src/qml/animations/qsequentialanimationgroupjob.cpp
Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
Diffstat (limited to 'src/qml/doc')
-rw-r--r-- | src/qml/doc/src/cppintegration/definetypes.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/qmllanguageref/syntax/signals.qdoc | 32 |
2 files changed, 18 insertions, 16 deletions
diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc index 0cce1895cb..f6f630c749 100644 --- a/src/qml/doc/src/cppintegration/definetypes.qdoc +++ b/src/qml/doc/src/cppintegration/definetypes.qdoc @@ -66,6 +66,8 @@ this manner, but the type cannot be used instantiated as a QML object type from QML. This is useful, for example, if a type has enums that should be exposed to QML but the type itself should not be instantiable. +For a quick guide to choosing the correct approach to expose C++ types to QML, +see \l {Choosing the Correct Integration Method Between C++ and QML}. \section2 Registering an Instantiable Object Type diff --git a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc index b643f18154..cd73ccc025 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc @@ -59,9 +59,9 @@ receiving this signal should be \c onClicked. In the example below, whenever the button is clicked, the \c onClicked handler is invoked, applying a random color to the parent \l Rectangle: -\qml -import QtQuick 2.\QtMinorVersion -import QtQuick.Controls 2.\QtMinorVersion +\qml \QtMinorVersion +import QtQuick 2.\1 +import QtQuick.Controls 2.\1 Rectangle { id: rect @@ -87,8 +87,8 @@ these signals are written in the form \e on<Property>Changed, where For example, the \l MouseArea type has a \l {MouseArea::pressed}{pressed} property. To receive a notification whenever this property changes, write a signal handler named \c onPressedChanged: -\qml -import QtQuick 2.\QtMinorVersion +\qml \QtMinorVersion +import QtQuick 2.\1 Rectangle { id: rect @@ -116,9 +116,9 @@ received by the root \l Rectangle instead, by placing the \c onClicked handler in a \l Connections object that has its \l {Connections::target}{target} set to the \c button: -\qml -import QtQuick 2.\QtMinorVersion -import QtQuick.Controls 2.\QtMinorVersion +\qml \QtMinorVersion +import QtQuick 2.\1 +import QtQuick.Controls 2.\1 Rectangle { id: rect @@ -151,8 +151,8 @@ For example, \l{Component::completed}{Component.onCompleted} is an attached signal handler. It is often used to execute some JavaScript code when its creation process is complete. Here is an example: -\qml -import QtQuick 2.\QtMinorVersion +\qml \QtMinorVersion +import QtQuick 2.\1 Rectangle { width: 200; height: 200 @@ -195,9 +195,9 @@ root \l Rectangle object has an \c activated signal, which is emitted whenever t child \l TapHandler is \c tapped. In this particular example the activated signal is emitted with the x and y coordinates of the mouse click: -\qml +\qml \QtMinorVersion // SquareButton.qml -import QtQuick 2.\QtMinorVersion +import QtQuick 2.\1 Rectangle { id: root @@ -237,8 +237,8 @@ signal to be received by a method instead of a signal handler. Below, the \c messageReceived signal is connected to three methods using the \c connect() method: -\qml -import QtQuick 2.\QtMinorVersion +\qml \QtMinorVersion +import QtQuick 2.\1 Rectangle { id: relay @@ -289,8 +289,8 @@ Rectangle { By connecting signals to other signals, the \c connect() method can form different signal chains. -\qml -import QtQuick 2.\QtMinorVersion +\qml \QtMinorVersion +import QtQuick 2.\1 Rectangle { id: forwarder |