aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/tutorials/extending-qml-advanced/advanced2-Inheritance-and-coercion/doc
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-11-06 13:33:15 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-11-07 12:28:41 +0100
commit65aea076261d0651c515999040460008d6183af4 (patch)
treeba56d726c07a154bfe1d0701ca95c69d183d4af2 /examples/qml/tutorials/extending-qml-advanced/advanced2-Inheritance-and-coercion/doc
parent34110468cf63450827f693f6b29bebdd04d4beda (diff)
Documentation: Use more references in the QML tutorial examples
Pick-to: 6.8 Change-Id: Id40b51d321830477ad67545ef0e96124ccafc894 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/qml/tutorials/extending-qml-advanced/advanced2-Inheritance-and-coercion/doc')
-rw-r--r--examples/qml/tutorials/extending-qml-advanced/advanced2-Inheritance-and-coercion/doc/advanced2-Inheritance-and-coercion.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/qml/tutorials/extending-qml-advanced/advanced2-Inheritance-and-coercion/doc/advanced2-Inheritance-and-coercion.rst b/examples/qml/tutorials/extending-qml-advanced/advanced2-Inheritance-and-coercion/doc/advanced2-Inheritance-and-coercion.rst
index f5e989044..e55705d59 100644
--- a/examples/qml/tutorials/extending-qml-advanced/advanced2-Inheritance-and-coercion/doc/advanced2-Inheritance-and-coercion.rst
+++ b/examples/qml/tutorials/extending-qml-advanced/advanced2-Inheritance-and-coercion/doc/advanced2-Inheritance-and-coercion.rst
@@ -23,7 +23,7 @@ To do this, the ``Boy`` and ``Girl`` classes are introduced, both inheriting fro
The ``Person`` class remains unaltered and the ``Boy`` and ``Girl`` classes are
trivial extensions of it. The types and their QML name are registered with the
-QML engine with ``@QmlElement``.
+QML engine with :deco:`~PySide6.QtQml.QmlElement`.
Notice that the ``host`` and ``guests`` properties in ``BirthdayParty`` still
take instances of ``Person``.
@@ -47,8 +47,9 @@ explicit ``Boy`` or ``Girl`` should be instantiated instead.
While we want to disallow instantiating ``Person`` from within QML, it still
needs to be registered with the QML engine so that it can be used as a property
-type and other types can be coerced to it. This is what the ``@QmlUncreatable``
-macro does. As all three types, ``Person``, ``Boy`` and ``Girl``, have been
+type and other types can be coerced to it. This is what
+:deco:`~PySide6.QtQml.QmlUncreatable` does.
+As all three types, ``Person``, ``Boy`` and ``Girl``, have been
registered with the QML system, on assignment, QML automatically (and
type-safely) converts the ``Boy`` and ``Girl`` objects into a ``Person``.