aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml
diff options
context:
space:
mode:
authorNico Vertriest <nico.vertriest@qt.io>2016-12-16 16:30:01 +0100
committerNico Vertriest <nico.vertriest@qt.io>2017-03-13 11:40:25 +0000
commit46468c4762b7e5fc4a69b6560af78a926b651554 (patch)
treeeb37a9b3944f9ef6d9da1b56dc28997b4b834247 /examples/qml
parent5b94de09cc738837d1539e28b3c0dccd17c18d29 (diff)
Doc: added snippets to Extension Objects Example
Change-Id: Icbd2393d4b8523e24328f765e76869c86afb3e72 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/qml')
-rw-r--r--examples/qml/doc/src/qml-extending.qdoc18
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.
*/
/*!