aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-11 01:00:18 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-11 01:00:19 +0200
commit66db74e53e3fa4aedeb519b8c8626066e1d6a1ce (patch)
tree619645d587124358a835341691ee20559865aea8 /src/qml/doc
parentbdc12f241118304a644f433bc3b75085c27a261d (diff)
parent45f95e74297ab3778965319c175a6d726f9c8afe (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/src/javascript/imports.qdoc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/doc/src/javascript/imports.qdoc b/src/qml/doc/src/javascript/imports.qdoc
index 974f2e154f..8e26c4aadd 100644
--- a/src/qml/doc/src/javascript/imports.qdoc
+++ b/src/qml/doc/src/javascript/imports.qdoc
@@ -144,14 +144,17 @@ A JavaScript resource may import a QML module in the following fashion:
.import TypeNamespace MajorVersion.MinorVersion as Qualifier
\endcode
-For example:
+Below you can see an example that also shows how to use the QML types from a
+module imported in javascript:
+
\code
.import Qt.test 1.0 as JsQtTest
+
+var importedEnumValue = JsQtTest.MyQmlObject.EnumValue3
\endcode
In particular, this may be useful in order to access functionality provided
via a singleton type; see qmlRegisterSingletonType() for more information.
\note The .import syntax doesn't work for scripts used in the \l {WorkerScript}
-
*/