diff options
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`` |
