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
Posts: 11
Registered: ‎12-27-2012
My Device: bb10 developer alpha

Landscape Orientation QT2BB10

Hello

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

how to lock landscape mode in qt/quick project.

I have changed the descriptor file to landscape mode and screen
orientation in main.cpp to lock landscape mode, but still can't
landscape the application

some times when i succeed to run at landscape mode the application
crashes when go back to portrait at running time.

and this shown on the console

///////////////

Qml debugging is enabled. Only use this in a safe environment!

Unsupported query type: 100

Unsupported query type: 0

QDeclarativeDebugServer: Waiting for connection on port 3768...

QBBWindow: invalid buffer count. Expected = 2, got = 1

//////////////

what i can do for this problem?


Thanks

BlackBerry Development Advisor
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: Landscape Orientation QT2BB10

you made sure you did the following in the bar-descriptor?

 

<initialWindow>

    <aspectRatio>landscape</aspectRatio>

    <autoOrient>false</autoOrient>

....

 

 

Contributor
Posts: 11
Registered: ‎12-27-2012
My Device: bb10 developer alpha

Re: Landscape Orientation QT2BB10

[ Edited ]
 
Contributor
Posts: 11
Registered: ‎12-27-2012
My Device: bb10 developer alpha

Re: Landscape Orientation QT2BB10



i tried to to this

but its not working on qt quick

some times the app crashes when rotate the device :smileysad:
BlackBerry Development Advisor
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: Landscape Orientation QT2BB10

must be some artifact of the QtQuick implementation.  maybe it's directly monitoring accelerometers?

If the aforementioned settings are applied in the bar descriptor, then navigator will not send orientation events to your app.

Contributor
Posts: 11
Registered: ‎12-27-2012
My Device: bb10 developer alpha

Re: Landscape Orientation QT2BB10

I don't know what qt exactly doing

but I solved it by lock orientation to portrait mode
 and rotate qml view to 90

its stupid solution, but I think there a bug in BB blugin in qt

so i will wait for next BB update

:smileyhappy: