aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlElement.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/pyside6/doc/extras/QtQml.QmlElement.rst b/sources/pyside6/doc/extras/QtQml.QmlElement.rst
index b567bb3cc..2746fbc0b 100644
--- a/sources/pyside6/doc/extras/QtQml.QmlElement.rst
+++ b/sources/pyside6/doc/extras/QtQml.QmlElement.rst
@@ -9,7 +9,8 @@ QmlElement
This decorator registers a class it is attached to for use in QML, using
global variables to specify the import name and version.
- ::
+ .. code-block:: python
+
QML_IMPORT_NAME = "com.library.name"
QML_IMPORT_MAJOR_VERSION = 1
QML_IMPORT_MINOR_VERSION = 0 # Optional
@@ -20,7 +21,8 @@ QmlElement
Afterwards the class may be used in QML:
- ::
+ .. code-block:: python
+
import com.library.name 1.0
ClassForQml {