Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
water_core
Posts: 11
Registered: ‎12-15-2012
My Device: bb10
My Carrier: yangji

how to lock landscape mode use Qt+quick?

I use qt and quick develop applications for bb10,I have encountered a problem,

how to lock landscape mode in qt/quick project.

I have tested QQmlApplication and descriptor.bar to lock ,but can work,can somebody help?

Please use plain text.
Contributor
water_core
Posts: 11
Registered: ‎12-15-2012
My Device: bb10
My Carrier: yangji

Re: how to lock landscape mode use Qt+quick?

No one know how to do?

Please use plain text.
New Contributor
trismer
Posts: 6
Registered: ‎12-20-2012
My Device: BB10 DevAlpha
My Carrier: N/A

Re: how to lock landscape mode use Qt+quick?

Hi,

 

I'm afraid it requires some additional hacking. RIM doesn't seem to fully test the QML framework without cascades. Configuration in bar descriptor file is not enought. I tried several ways without full success. RIM, please share any example of pure QtQuick1 application which supports landscape mode only. I don't know if it's a problem of DevAlpha device or maybe it requires additional changes to the qmlapplicationviewer or the application itself.

 

Best regards,

Maciej Kujalowicz

Trismer Technologies

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: how to lock landscape mode use Qt+quick?

Qt app (I know nothing about QtQuick) is successfully locked with 

<initialWindow>
<aspectRatio>portrait</aspectRatio>
<autoOrients>false</autoOrients>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
</initialWindow>

in .bar file.

Please use plain text.
Contributor
water_core
Posts: 11
Registered: ‎12-15-2012
My Device: bb10
My Carrier: yangji

Re: how to lock landscape mode use Qt+quick?

I don't know do you have tested in simulator or on device,but with the gold release version ,this can not work!

Please use plain text.
New Contributor
trismer
Posts: 6
Registered: ‎12-20-2012
My Device: BB10 DevAlpha
My Carrier: N/A

Re: how to lock landscape mode use Qt+quick?

I agree, it works perfectly, but for Qt Cascades app.  Also as far as I remember it worked on Blackberry Playbook OS as well. Try to create any QtQuick application in Qt Creator for BB10. With the mentioned settings it doesn't lock the landscape mode on BB10 DevAlpha. Calling setOrientation on qmlapplicationviewer doesn't help either.  There is a tip mentioned during BBJam America related to OpenGL viewport: 

http://youtu.be/hCMMyG3EJ9A

It helps partially.

 

Best regards,

Maciej Kujalowicz

Trismer Technologies

Please use plain text.
New Contributor
zing0000
Posts: 3
Registered: ‎12-25-2012
My Device: BB10 + Playbook
My Carrier: 6508236685

Re: how to lock landscape mode use Qt+quick?

This is a problem for those of us trying to make portable applications with Qt.

My App is stuck, rejected at the Store, because of this. Expecting the user to remember to hold the device in landscape mode when launching the App is not a solution!

 

Even the porting demo code at

http://developer.blackberry.com/native/documentation/bb10/qt_port_qtquick.html

 

has the same problem. OK with orientation = Auto, but not when "fixed"

 

Please use plain text.