path: root/doc/src/examples/qmlqtsensors.qdoc
diff options
authorWolfgang Beck <>2012-05-17 12:27:18 +1000
committerQt by Nokia <>2012-05-24 03:06:56 +0200
commit17d908ba5205513e9ed0be33aebeb3736bda0326 (patch)
treeda04213540ee61853aab6b4260721f1badd703b2 /doc/src/examples/qmlqtsensors.qdoc
parent32e2d98ea438041e7e0c4df7e67053c5ee7527a7 (diff)
Unfork the examples.
Some examples were forked off and updated. Unfork by bringing these changes back (a later update will bring the other examples in line with this new style). The changes are primarily made up of file renaming. Also, JPG files have been converted to PNG. Some documentation updates have been done. Change-Id: Ib090abb5ebea2003d479d2336a23317f52b8c4d8 Reviewed-by: Lincoln Ramsay <>
Diffstat (limited to 'doc/src/examples/qmlqtsensors.qdoc')
1 files changed, 14 insertions, 12 deletions
diff --git a/doc/src/examples/qmlqtsensors.qdoc b/doc/src/examples/qmlqtsensors.qdoc
index d8173306..4c509392 100644
--- a/doc/src/examples/qmlqtsensors.qdoc
+++ b/doc/src/examples/qmlqtsensors.qdoc
@@ -26,43 +26,45 @@
- \example sensors/qmlqtsensors
- \title Qt Sensors - Simple QML Example
+ \example QtSensors/QtSensors_qmlqtsensors
+ \title Qt Sensors - QML example
\ingroup qtsensors-examples
- \brief The Qt Sensors simple QML example demonstrates the QML sensors elements in the QtSensors 5 import.
- \image qmlqtsensors.jpg
+ \image qmlqtsensors.png
+ \section2 Qt Sensors in QML
+ \brief The QML QtSensors example demonstrates the QML sensors elements in the QtSensors 5 import.
-\section1 Overview
To write a QML application that will use the QML sensors elements in the QtSensors 5 import you need to to the following steps:
Import the QtSensors 5.x declarative plugin:
-\snippet ../examples/sensors/qmlqtsensors/main.qml 0
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 0
Add the Sensor QML elements into your qml file.
In this example we use the TiltSensor:
-\snippet ../examples/sensors/qmlqtsensors/main.qml 1
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 1
The Tilt-, AmbientLight- and the Proximity QML element sensor have the 'enabled' property in common.
To start or stop the sensor set this property to true or false.
-\snippet ../examples/sensors/qmlqtsensors/main.qml 2
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 2
Reading the data can be done for each sensor type like following:
\l {QtSensors5::TiltSensor} {TiltSensor}
-\snippet ../examples/sensors/qmlqtsensors/main.qml 3
-\snippet ../examples/sensors/qmlqtsensors/main.qml 4
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 3
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 4
\l {QtSensors5::AmbientLightSensor} {AmbientLightSensor}
-\snippet ../examples/sensors/qmlqtsensors/main.qml 5
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 5
\l {QtSensors5::ProximitySensor} {ProximitySensor}
-\snippet ../examples/sensors/qmlqtsensors/main.qml 6
+ \snippet ../examples/QtSensors/QtSensors_qmlqtsensors/QtSensors_qmlqtsensors.qml 6