diff options
author | Liang Qi <liang.qi@qt.io> | 2017-03-02 09:05:12 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-03-02 09:05:12 +0100 |
commit | 78dd18a0cd18449e1289e428ea6eca65e28fb114 (patch) | |
tree | bbb442c218d1504adb70d49ae67ac78a9c2c42bd /src/qml/doc/src | |
parent | 015dff255ff0f40c553b1dee43c6cff013df64eb (diff) | |
parent | 8c864e52369ee4d55a1d9345215c8153144b5939 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I6cbd83b61fac34c2ba6936711289ec09a490719a
Diffstat (limited to 'src/qml/doc/src')
-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 |