Toggle navigation

Step 7: Getting accelerometer data

  1. Include the QAccelerometer header file and add a private member for accelerometer data by adding the following lines into sensorsapidialog.h:
  2. Define an update slot method to read accelerometer sensor data, by adding the following lines into sensorsapidialog.h:
  3. Update the setupGeneral() method for accelerometer in sensorsapidialog.cpp.
  4. Implement the updateAccelerometer() method to handle accelerometer changes and modify the destructor to handle accelerometer in sensorsapidialog.cpp.

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