How to Handle Screen Orientation to Portrait in Meego
I am working on an meego app thet will only run in portrait mode of screen orientation.
But If I use lock screen to portrait while creating new app or either if I change orientation in main.cpp file like below
It works pretty fine on symbian phone nokia c700 but on meego it shows only landscape mode of screen. But my app only needs to be supported in portrait.
So How can I lock screen orientation to Portrait in Meego n950?
Have you tried
@view.setAttribute(Qt::WA_Maemo5PortraitOrientation , true)@ or @view.setAttribute(Qt::WA_LockPortraitOrientation, true)@
or, if by any chance you're using QML:
hope this helps!
Thank You Andzero for giving quick response.
is only part of Page element in qml but in my app I am using rectangles Items and a Loader to move from one screen to other So I can not use this API in qml.
Also my app is typically in QmL so cannot do much in cpp but would you tell me about the view element in your answer in cpp, since I am using viewer which does not haveany any setattribute api to be used.
If you use a PageStackWindow and a single Page element as the base element for all of your other QML code, then you can use the orientationLock property. You don't need to take advantage of the advanced page stacking and navigation features.