aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst')
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst35
1 files changed, 15 insertions, 20 deletions
diff --git a/sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst b/sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst
index d603e2e83..79eb9d7ad 100644
--- a/sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst
+++ b/sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst
@@ -1,31 +1,26 @@
.. currentmodule:: PySide6.QtQml
-.. _QmlNamedElement:
-
-QmlNamedElement
-***************
-
.. py:decorator:: QmlNamedElement
- This decorator registers a class it is attached to for use in QML under
- a name different from the class name, using global variables to specify
- the import name and version.
+This decorator registers a class it is attached to for use in QML under
+a name different from the class name, using global variables to specify
+the import name and version.
- .. code-block:: python
+.. code-block:: python
- QML_IMPORT_NAME = "com.library.name"
- QML_IMPORT_MAJOR_VERSION = 1
- QML_IMPORT_MINOR_VERSION = 0 # Optional
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
- @QmlNamedElement("ClassForQml")
- class ClassWithSomeName(QObject):
+ @QmlNamedElement("ClassForQml")
+ class ClassWithSomeName(QObject):
...
- Afterwards the class may be used in QML:
+Afterwards the class may be used in QML:
- .. code-block:: javascript
+.. code-block:: javascript
- import com.library.name 1.0
+ import com.library.name 1.0
- ClassForQml {
- // ...
- }
+ ClassForQml {
+ // ...
+ }