diff options
Diffstat (limited to 'sources/pyside2/doc/tutorials/basictutorial/qml.rst')
-rw-r--r-- | sources/pyside2/doc/tutorials/basictutorial/qml.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/pyside2/doc/tutorials/basictutorial/qml.rst b/sources/pyside2/doc/tutorials/basictutorial/qml.rst index 81583096b..fb168410a 100644 --- a/sources/pyside2/doc/tutorials/basictutorial/qml.rst +++ b/sources/pyside2/doc/tutorials/basictutorial/qml.rst @@ -14,7 +14,9 @@ that loads the QML file. To make things easier, let's save both files in the same directory. Here is a simple QML file called `view.qml`: -:: + +.. code-block:: javascript + import QtQuick 2.0 Rectangle { @@ -39,7 +41,9 @@ is the Rectangle in this case. Now, let's see how the code looks on the PySide2. Let's call it `main.py`: -:: + +.. code-block:: python + from PySide2.QtWidgets import QApplication from PySide2.QtQuick import QQuickView from PySide2.QtCore import QUrl |