diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-04-13 20:56:01 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-04-13 20:56:01 +0200 |
commit | 1fb1c6c4f8769250dffa375e3941738eb1fcc885 (patch) | |
tree | 4f4c4afae97b54a793a0589f8ca53b7c919de728 /examples/qml/doc/src/qml-extending.qdoc | |
parent | d0ce320646b7f852a24f6e0a9e9621ddcedef554 (diff) | |
parent | 9c1c471e54bb12e8740b76d1c048f2f916a6ab59 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/pointerhandler
Change-Id: Ie2894830470a69827d4ace3d8af9bee971e3fbd4
Diffstat (limited to 'examples/qml/doc/src/qml-extending.qdoc')
-rw-r--r-- | examples/qml/doc/src/qml-extending.qdoc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/qml/doc/src/qml-extending.qdoc b/examples/qml/doc/src/qml-extending.qdoc index b4174426a8..f99aca5457 100644 --- a/examples/qml/doc/src/qml-extending.qdoc +++ b/examples/qml/doc/src/qml-extending.qdoc @@ -73,24 +73,24 @@ This example builds on: \li \l {Extending QML - Adding Types Example} \endlist -Shows how to use \l {QQmlEngine::}{qmlRegisterExtendedType()} to provide an \l {Registering -Extension Objects}{extension object} to a \l QLineEdit without modifying or -subclassing. +Shows how to use \l {QQmlEngine::}{qmlRegisterExtendedType()} to provide an +\l {Registering Extension Objects}{extension object} to a \l QLineEdit without modifying or +subclassing it. + +Firstly, the LineEditExtension class is registered with the QML system as an extension of QLineEdit: \snippet referenceexamples/extended/main.cpp 0 -The QML engine instantiates a \l QLineEdit +The QML engine then instantiates a \l QLineEdit: \snippet referenceexamples/extended/main.cpp 1 -and sets a property that oly exists on the extension type. +In QML, a property is set on the line edit that only exists in the LineEditExtension class: \snippet referenceexamples/extended/example.qml 0 -The QML engine instantiates a \l QLineEdit and sets a property that -only exists on the extension type. The extension type performs calls on the -\l QLineEdit that otherwise will not be accessible to the QML engine. - +The extension type performs calls on the \l QLineEdit that otherwise will +not be accessible to the QML engine. */ /*! |