diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-03-14 13:44:47 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-03-20 06:11:50 +0000 |
commit | fdd988494aedba9f58b54e958fab91f566186ed1 (patch) | |
tree | 91366d1b1917adb54f2db3b33c36a6ec2408e116 /src/qml/doc | |
parent | 0b7e479235aec74f051af4d5ef95e74753b59c6d (diff) |
Doc: Clarify section about qmlRegisterInterface()
There is very little you can do with things registered as interfaces.
Change-Id: I5e4dcf8529c2d7c8012db3fa1dcfc23563cc2cba
Fixes: QTBUG-74318
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/doc')
-rw-r--r-- | src/qml/doc/src/cppintegration/definetypes.qdoc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc index f6f630c749..41bc9fd140 100644 --- a/src/qml/doc/src/cppintegration/definetypes.qdoc +++ b/src/qml/doc/src/cppintegration/definetypes.qdoc @@ -142,9 +142,10 @@ types: \li qmlRegisterType() (with no parameters) registers a C++ type that is not instantiable and cannot be referred to from QML. This enables the engine to coerce any inherited types that are instantiable from QML. -\li qmlRegisterInterface() registers a Qt interface type with a specific QML -type name. The type is not instantiable from QML but can be referred to by its -type name. +\li qmlRegisterInterface() registers an existing Qt interface type. The type is +not instantiable from QML, and you cannot declare QML properties with it. Using +C++ properties of this type from QML will do the expected interface casts, +though. \li qmlRegisterUncreatableType() registers a named C++ type that is not instantiable but should be identifiable as a type to the QML type system. This is useful if a type's enums or attached properties should be accessible from QML |