diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2016-06-08 12:35:05 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-06-09 19:23:32 +0000 |
commit | dc56491ab6c60cd2fc0cab4514e3da444f255859 (patch) | |
tree | 491fa233ef925bf3955745c7f82a29e806513f7f | |
parent | 63c10e11fa508e1b4b26fae3d7a897cc3d9375c3 (diff) |
Doc: Add documentation for the Simple QML example
Without this change Qt Creator tags this example "broken"
and hides it from the Examples tab in the Welcome mode.
Change-Id: I4f0faa6b18c3f1ec2de673e3f6ced7e23b46c094
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | examples/qt3d/simple-qml/doc/images/simple-qml.png | bin | 0 -> 17485 bytes | |||
-rw-r--r-- | examples/qt3d/simple-qml/doc/src/simple-qml.qdoc | 52 |
2 files changed, 52 insertions, 0 deletions
diff --git a/examples/qt3d/simple-qml/doc/images/simple-qml.png b/examples/qt3d/simple-qml/doc/images/simple-qml.png Binary files differnew file mode 100644 index 000000000..a0a349025 --- /dev/null +++ b/examples/qt3d/simple-qml/doc/images/simple-qml.png diff --git a/examples/qt3d/simple-qml/doc/src/simple-qml.qdoc b/examples/qt3d/simple-qml/doc/src/simple-qml.qdoc index 36bb5497e..13ca8ff1f 100644 --- a/examples/qt3d/simple-qml/doc/src/simple-qml.qdoc +++ b/examples/qt3d/simple-qml/doc/src/simple-qml.qdoc @@ -29,4 +29,56 @@ \example simple-qml \title Qt 3D: Simple QML Example \ingroup qt3d-examples-qml + \brief A QML application that demonstrates how to render a scene in Qt 3D. + + \image simple-qml.png + + \e {Simple} demonstrates how to render a scene in Qt 3D. + + \include examples-run.qdocinc + + \section1 Setting Up the Scene + + We set up the entire scene in the \e main.qml file. + + To be able to use the types in the Q3D and Q3D Render modules, we must + import the modules: + + \quotefromfile simple-qml/main.qml + \skipto import Qt3D.Core + \printuntil Render 2.0 + + The first entities we create are a \l Camera, which represents the camera + used for the final rendering, and a camera controller, which allows us to + control this camera using the keyboard or the mouse: + + \skipto Camera { + \printuntil } + \printuntil } + + A \l RenderSettings entity specifies a ForwardRenderer as the active + framegraph: + + \printuntil }, + + The event source is set by the Qt3DQuickWindow: + + \skipto InputSettings + \printuntil } + + \section1 + + \section1 Specifying Settings and Axes + + In the \e CameraController.qml file, we use the LogicalDevice type to define + a set of actions and axes to use within the application: + + \quotefromfile simple-qml/CameraController.qml + \skipto LogicalDevice { + \printuntil ] + \dots + \skipto axes + \printuntil ] + \dots + \skipto /^\}/ */ |