Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Display portrait qml application in landscape
Quite often an application is designed and build in a portrait mode and while the device used for testing it might be N900, the result is not what expected. The application is visible only half of the screen and literally in portrait.
To accommodate this, you can consider using the following snippet as a wrapper for the application and in this way still keep building it as portrait, but to be able to test it for example in N900.
* QML Application sizing and rotation as per N900
import QtQuick 1.0 // Qt 4.7.1 and up, N900 with qt quick compatibility package
import Qt 4.7 // Qt 4.7.0
// Container element for rotating
// Add the main QML element here...
QML with Qt
// force lock for portrait mode