From 65aea076261d0651c515999040460008d6183af4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Nov 2024 13:33:15 +0100 Subject: Documentation: Use more references in the QML tutorial examples Pick-to: 6.8 Change-Id: Id40b51d321830477ad67545ef0e96124ccafc894 Reviewed-by: Cristian Maureira-Fredes --- .../tutorials/extending-qml-advanced/extended/doc/extended.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'examples/qml/tutorials/extending-qml-advanced/extended') diff --git a/examples/qml/tutorials/extending-qml-advanced/extended/doc/extended.rst b/examples/qml/tutorials/extending-qml-advanced/extended/doc/extended.rst index 0df21716e..f901de9a2 100644 --- a/examples/qml/tutorials/extending-qml-advanced/extended/doc/extended.rst +++ b/examples/qml/tutorials/extending-qml-advanced/extended/doc/extended.rst @@ -3,12 +3,12 @@ Extending QML - Extension Objects Example This example builds on the the :ref:`example_qml_tutorials_extending-qml-advanced_adding`. -Shows how to use QmlExtended decorator to provide an extension object to a +Shows how to use :deco:`~PySide6.QtQml.QmlExtended` to provide an extension object to a QLineEdit without modifying or subclassing it. Firstly, the LineEditExtension class is registered with the QML system as an -extension of QLineEdit. We declare a foreign type to do this as we cannot -modify Qt's internal QLineEdit class. +extension of :class:`~PySide6.QtWidgets.QLineEdit`. We declare a foreign type to do +this as we cannot modify Qt's internal QLineEdit class. .. code-block:: python @@ -18,7 +18,8 @@ modify Qt's internal QLineEdit class. class LineEditForeign(QObject): -Note the usage of ``QmlNamedElement()`` instead of ``QmlElement()``. +Note the usage of :deco:`~PySide6.QtQml.QmlNamedElement` instead of +:deco:`~PySide6.QtQml.QmlElement`. ``QmlElement()`` uses the name of the containing type by default, ``LineEditExtension`` in this case. As the class being an extension class is an implementation detail, we choose the more natural name ``QLineEdit`` -- cgit v1.2.3