diff options
author | Liang Qi <liang.qi@qt.io> | 2017-02-24 10:14:57 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-02-24 11:48:14 +0100 |
commit | b1fa22c1683d9f6cedb001f5ef8a0dac71868935 (patch) | |
tree | c30a114c75be071310df974283b928329f9d5c12 /src/qml/doc/src/qmlfunctions.qdoc | |
parent | ba68c325688acf3072715757480497524f61c425 (diff) | |
parent | fe5d69669197a51662061b014810f0242eec5ca7 (diff) |
Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
src/qml/compiler/qv4ssa.cpp
src/quick/accessible/qaccessiblequickview_p.h
src/quick/items/qquickmousearea.cpp
src/quick/util/qquickanimatorjob.cpp
tools/qmlplugindump/main.cpp
Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
Diffstat (limited to 'src/qml/doc/src/qmlfunctions.qdoc')
-rw-r--r-- | src/qml/doc/src/qmlfunctions.qdoc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc index a03c382ed5..834684fe6d 100644 --- a/src/qml/doc/src/qmlfunctions.qdoc +++ b/src/qml/doc/src/qmlfunctions.qdoc @@ -168,8 +168,9 @@ from \a uri having version number composed from \a versionMajor and \a versionMinor. - While the type has a name and a type, it cannot be created, and the - given error \a reason will result if creation is attempted. + While the type has a name and a type, it cannot be created. An error + message with the given \a reason is printed if the user attempts to + create an instance of this type. This is useful where the type is only intended for providing attached properties, enum values or an abstract base class with its extension. @@ -189,11 +190,14 @@ from \a uri having version number composed from \a versionMajor and \a versionMinor. - This function is useful to register Q_NAMESPACE namespaces. + An instance of the meta object cannot be created. An error message with + the given \a reason is printed if the user attempts to create it. + + This function is useful for registering Q_NAMESPACE namespaces. Returns the QML type id. - Example: + For example: \code namespace MyNamespace { @@ -209,7 +213,7 @@ qmlRegisterUncreatableMetaObject(MyNamespace::staticMetaObject, "io.qt", 1, 0, "MyNamespace", "Access to enums & flags only"); \endcode - Now on QML side you can use the registered enums: + On the QML side, you can now use the registered enums: \code Component.onCompleted: console.log(MyNamespace.Key2) \endcode |