N9/Harmattan screen locking to portrait ?
Hi,
is there any simple way to prevent screen automatically turn (like in Symbian with Qt::WA_LockPortraitOrientation) ?
I tried locking with Page but that did not worked always.
My app is mentioned for portrait only, it does not make sense to have it turn to horizontal.
Re: N9/Harmattan screen locking to portrait ?
orientationLock: PageOrientation.LockPortrait works for me.
Re: N9/Harmattan screen locking to portrait ?
SaiHtun's solution works for me too.
jtb63, how did you try to lock the Page to portrait?
Hartti
Re: N9/Harmattan screen locking to portrait ?
I have a similar problem. If I create a new Qt mobile application and choose "lock to portrait mode" in the wizard, the application starts in landscape mode on the n950. Anybody else with this problem?
Re: N9/Harmattan screen locking to portrait ?
Use page orientation lock. Check this link [URL="http://library.developer.nokia.com/index.jsp?topic=/MeeGo_1.2_Harmattan_API/html/guide/html/Developer_Library_Reference_documentation_Porting_applications_to_Harmattan_e46e.html"]http://library.developer.nokia.com/......ion_Porting_applications_to_Harmattan_e46e.html[/URL]
It won't work if you slide out the keypad of N950. But N9 doesn't have a keypad so it wouldn't be a problem.
Re: N9/Harmattan screen locking to portrait ?
So no chance to lock the device to portrait mode without Qt Quick at the moment?
Re: N9/Harmattan screen locking to portrait ?
Technically it should be possible to wrap the non-QML UI in some other Qt widget, which then allows you to lock the screen size/orientation (I do not have the specifics on how to do that as I do not know Qt well enough myself). There could be some unwanted consequences in this kind of approach, like in the event propagation or getting virtual keyboard to show in correct orientation. Porting your UI to QML/Qt Quick is recommended and more future proof approach.
Hartti
Re: N9/Harmattan screen locking to portrait ?
At the moment it is not an option to port our existing Qt application to Qt Quick. Hope there is another solution soon.
Edit: there is already a bug report at: [url]http://bugreports.qt.nokia.com/browse/QTBUG-19733[/url] (please vote)