import QtQuick 1.1 import QtMobility.sensors 1.1 import com.nokia.meego 1.0 Page { tools: commonTools property real a: 0 function updateAcceltext(x,y){ var a_new = Math.sqrt(x*x+y*y) if (a_new > a){ a = (a_new/10*9.81).toFixed(2) txtAccelerometer.text = "Acceleration: \nX: " + a } } Accelerometer { id: accData active: true onReadingChanged: { updateAcceltext(reading.x,reading.y) } } Text { id: txtAccelerometer anchors.centerIn: parent text: "Accelerometer starting.." font.pointSize: 50 } }