diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-11-06 13:33:15 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-11-07 12:28:41 +0100 |
| commit | 65aea076261d0651c515999040460008d6183af4 (patch) | |
| tree | ba56d726c07a154bfe1d0701ca95c69d183d4af2 /examples/qml/tutorials/extending-qml-advanced/extended | |
| parent | 34110468cf63450827f693f6b29bebdd04d4beda (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/extended')
| -rw-r--r-- | examples/qml/tutorials/extending-qml-advanced/extended/doc/extended.rst | 9 |
1 files changed, 5 insertions, 4 deletions
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`` |
