Correct me if I'm wrong but N8 is Symbian based, so the path to the accelerometer is incorrect. Why don't you use QSensor from QtMobility instead?