01-27-2013 03:51 PM - edited 01-28-2013 01:57 AM
Hello guys,
I want to make a QML app in Qt Creator 2.6.1 in landscape mode. But I can't make the app stay in landscape mode. If I run it first time, it stays in landscape, but when I run it second time, third time, it is in portrait.
I've tried all the possible settings like setting the orientation in main.cpp with and
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
and setting the orientation in bar-descriptor.xml with:
<initialWindow>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
<autoOrients>false</autoOrients>
<aspectRatio>landscape</aspectRatio>
</initialWindow> but the problem is still there ![]()
I've tried different settings in main.cpp and bar-descriptor.xml, but the same thing happens.
Anyone succeded to make a landscape app for Dev Alpha B?
Any ideas why I can't make the app in landscape mode? Any bugs on the device?
LE: I have created a sample app which can be found here: https://dl.dropbox.com/u/46032438/landscapetest.zi
01-28-2013 03:37 PM
01-28-2013 04:39 PM
kizkasen wrote:
If you call showFullScreen instead of showExpanded, then it should work.
No, it does not work. It works only when you compile and run the app from the Qt Creator, but after that, when you run the app from the phone, it's still in portrait mode.
01-29-2013 02:56 AM
Made a small step: if I add
CONFIG += cascades device
in my pro file, call showFullScreen(); and set setAttribute(Qt::WA_LockLandscapeOrientation,true) in qmlapplicationviewer.cpp,
my app starts in landscape, but sometimes, my landscape is upside down. This is really annoying
I can't figure out why is this happening. It seems that the Qt::WA_LockLandscapeOrientation attribute does not work on bb10, but as I've read in another topic, this was fixed in late oct. Can the Qt version from the device (4.8.4 build date 8 january 2013 - thanks to QtInfo app for the info) be different and not including the fix for the Qt::WA_LockLandscapeOrientation attribute?
03-21-2013 03:52 PM
Qt Creator (at least 2.7) templates for BlackBerry 10 have no orientation issues.
Please use 2.7 and test the basic hello world apps. Please advise us on the results.
03-21-2013 06:41 PM - edited 03-21-2013 06:51 PM
It seems to work, at least for me, in 99% of the cases the app launches as it should. But still, sometimes, very rare, it launches in portrait instead of landscape
Using viewer.showFullScreen(); instead of viewer.showExpanded();
in the main.cpp file seems to work (or at least I wasn't able to reproduce the bug yet).
What was changed in this templates from Qt Creator 2.7.0? Because I haven't seen anything changed in the .pro or qmlapplicationviewer...
I'm using the latest NDK and the latest version of BB10 OS for DevAlpha