Toggle navigation

Step 6: Getting rotation sensor data

  1. Define the updateRotation() slot method to read the rotation sensor data and to output data to the screen when the reading is changed by adding the following lines to sensorsapidialog.h:
  2. Connect the readingChanged signal of the rotationSensor to the updateRotation slot method by adding the following line of code to the constructor in sensorsapidialog.cpp:
  3. Implement the updateRotation() method in sensorsapidialog.cpp to read the rotation sensor data and to output data to the screen:

Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved