Problem when locking screen orientation in Symbian app
-
Hi, I'm having a problem when trying to lock the orientation of my app to portrait mode. It works almost everytime but when I launch the app with the phone in landscape mode the app doesn't get the correct dimensions and I end up with something like what is shown in the image.
!http://dl.dropbox.com/u/387660/Scr000008.jpg(HalfScreen)!
Any idea of what could be the problem and how to solve it?
I'm using Qt 4.7.4 and Qt Quick 1.1.
I have created the app with the Qt Creators wizard so my main.qml contains a PageStackWindow component
I use the following lines in main.cpp to lock the apps orientation:@QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
(...)
viewer.showExpanded();
@I 've tested the app in my E7 an also in a N8 from the RDA, both with the same result.
-
Hi, I know that I am responding on older post but i have the same problem on my Nokia 603 (FP1) any solution for that?
-
Yes there is a solution, I found that it is a reported bug https://bugreports.qt-project.org/browse/QTCOMPONENTS-1201
So I asked in the bug repor page and they told me this:
bq. You should be able to circumvent the issue by locking the orientation using the Page.orientationLock property ( http://doc.qt.nokia.com/qtquick-components-symbian-1.1/qml-page.html ), instead of locking the orientation using C++ API:s.
Or if you are not using PageStack in the application you can use screen.allowedOrientations ( http://doc.qt.nokia.com/qtquick-components-symbian-1.1/qml-screen.html ).It worked fine for me.
-
Thanks for quick reply, now it works. Super!