diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-11-23 13:17:40 +0100 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-11-23 14:29:02 +0100 |
commit | 56f428c360191230b571969a2651e85380030afa (patch) | |
tree | be6767d2baa7b00650153639f5f5be747a3517b2 /examples/qml/doc/src | |
parent | 22e13d41b0e8085b25b669eb7d23744252f2c117 (diff) |
qmlfunctions.qdoc: Add clarification to QML_FOREIGN
Fixes: QTBUG-87150
Pick-to: 5.15 6.0
Change-Id: If99a06a07892bdfef7b6b1e8fa737480750992fe
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/qml/doc/src')
-rw-r--r-- | examples/qml/doc/src/qml-extending.qdoc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/qml/doc/src/qml-extending.qdoc b/examples/qml/doc/src/qml-extending.qdoc index 723e470d45..c9922ebd45 100644 --- a/examples/qml/doc/src/qml-extending.qdoc +++ b/examples/qml/doc/src/qml-extending.qdoc @@ -79,6 +79,10 @@ Qt's internal QLineEdit class. \snippet referenceexamples/extended/lineedit.h 0 +Note the usage of \l QML_NAMED_ELEMENT() instead of \l QML_ELEMENT. +QML_ELEMENT uses the name of the containing type by default, "LineEditExtension" in this case. +As the class being an extension class is an implementation detail, we choose the more natural name "LineEdit" instead + The QML engine then instantiates a \l QLineEdit: \snippet referenceexamples/extended/main.cpp 1 |