The QtOrientationTest shows shows how to obtain the device orientation and adopt the user interface accordingly. An arrow is shown on the display that is pointing "upwards". If the device is flat on the table or face down, either a circle with a dot or a cross is shown, meaning you look to the pointy end of the arrow or from the back to the fletchings.
The example currently uses the deprecated so called "Qt Mobile Extensions" and should be ported to the new sensor-API of the "QtMobility-APIs".
See the application in action on youtube:
Testing the application
The example is either be meant to be compiled directly for the device or as a desktop application. When compiled for the device, the real sensor API is used. When compiled as a desktop application, a stub implementation of the sensor API is used that shows a window with 6 buttons to set the orientation.
Because of the usage of XQDeviceOrienation-class from the mobile extensions, ReadDeviceData-capability is needed. This capability cannot be granted to a self signed application. Use symbian signed online to test.