Creating sensor with QCompass fails with KERN EXEC 3 at symbian S60 5th N97 device. Compass cannot be created, you have to use QSensor with QByteArray compass("QCompass") instead and when reading data do static_cast QSensorReading to QCompassReading.
Here is code snippet to clarify issue:
QSensor* m_compass;
QSensorReading* m_currentCompassReading;
m_compass(new QSensor("QCompass", this))
QCompassReading reading = static_cast<QCompassReading>(m_currentCompassReading);
reading->azimuth()