aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/extras/QtQml.QmlForeign.rst
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/doc/extras/QtQml.QmlForeign.rst')
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlForeign.rst37
1 files changed, 16 insertions, 21 deletions
diff --git a/sources/pyside6/doc/extras/QtQml.QmlForeign.rst b/sources/pyside6/doc/extras/QtQml.QmlForeign.rst
index c58be3cb9..90b821e9b 100644
--- a/sources/pyside6/doc/extras/QtQml.QmlForeign.rst
+++ b/sources/pyside6/doc/extras/QtQml.QmlForeign.rst
@@ -1,33 +1,28 @@
.. currentmodule:: PySide6.QtQml
-.. _QmlForeign:
-
-QmlForeign
-**********
-
.. py:decorator:: QmlForeign
- This decorator can be used to change the type that is created by QML.
+This decorator can be used to change the type that is created by QML.
- This is useful for registering types that cannot be amended by adding the
- QmlElement decorator, for example because they belong to 3rdparty libraries.
+This is useful for registering types that cannot be amended by adding the
+QmlElement decorator, for example because they belong to 3rdparty libraries.
- .. 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("QWidget")
- @QmlForeign(QWidget)
- class ForeignWidgetHelperClass(QObject):
+ @QmlNamedElement("QWidget")
+ @QmlForeign(QWidget)
+ class ForeignWidgetHelperClass(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
- QWidget {
- // ...
- }
+ QWidget {
+ // ...
+ }