diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-02-15 15:57:49 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-15 18:46:23 +0000 |
commit | 91ff50da045330515a1a67c69b101540c9012886 (patch) | |
tree | 9ca2128fd3754514d36364f01b6b83fc6832ab84 | |
parent | dce707c3d60b22aaef32eb6b58e97699099377ad (diff) |
PySide6/Documentation: Fix QmlElement.rst
Change the snippets to be Python code, fixing:
QmlElement.rst:28: warning: Definition list ends without a blank line; unexpected unindent.
Change-Id: I98fa640e206199a466fa9aa8b5df3363fe118f69
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit a47c2618139fdb5c63e4614fe164a63d30f32fa8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/pyside6/doc/extras/QtQml.QmlElement.rst | 6 |
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 { |