diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-11 01:00:18 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-11 01:00:19 +0200 |
commit | 66db74e53e3fa4aedeb519b8c8626066e1d6a1ce (patch) | |
tree | 619645d587124358a835341691ee20559865aea8 /src/qml/doc | |
parent | bdc12f241118304a644f433bc3b75085c27a261d (diff) | |
parent | 45f95e74297ab3778965319c175a6d726f9c8afe (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I1359574c7d89aaf3328958e2f667ba1e599ff7f1
Diffstat (limited to 'src/qml/doc')
-rw-r--r-- | src/qml/doc/src/javascript/imports.qdoc | 7 |
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} - */ |