diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-15 01:00:09 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-03-15 11:20:40 +0100 |
commit | 67cc0be410e0325ff5c8757684cacd02eea91572 (patch) | |
tree | d41a8a73b6792e6ebd70b94cd439d6b33bdcadda /src/qml/doc | |
parent | 662c53dc583188d0278c86f59ab6b80056dbd419 (diff) | |
parent | f10ac43ebb839b61315bd3b370b77683b625e4c4 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/qml/compiler/qv4codegen.cpp
Change-Id: I604517d0948fb5056ce36cc104f13ac956fbcc24
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 |