Hi, You can use QtMobility::QOrientation sensor. Example code there: http://cdumez.blogspot.com/2010/12/screen-orientation-detection-for-qml.html
Kr, Chris. -----Original Message----- From: meego-dev-boun...@meego.com [mailto:meego-dev-boun...@meego.com] On Behalf Of Cornelius Hald Sent: Friday, May 06, 2011 4:17 PM To: Thiago Macieira Cc: meego-dev@meego.com Subject: Re: [MeeGo-dev] Howto lock screen orientation in MeeGo/Tablet 1.2 ? On Fri, 2011-05-06 at 15:05 +0200, Thiago Macieira wrote: > Em Friday, 6 de May de 2011, às 14:46:15, Cornelius Hald escreveu: > > I thought I'll try a workaround and use MTF only for rotation. > > Unfortunately it looks like that's not that easy since MWindow and > > QWidget are not quite compatible. > > > > I really hope we get some framework support for that. > > You're using QWidget? I'm using QDeclarativeView as my root widget, which is a QWidget. How else could I use QML? Can I somehow use QML without QDeclarativeView? > Then I'm sorry, there's no good rotation practice within Qt. You need help > from the window manager / compositor and mcompositor won't do that for you. > > The only way to do this from inside the application is to do it manually by > placing the widget inside a QGraphicsProxyWidget and then rotate the graphics > view. This is extremely slow and not recommended. > > Actually, using QWidget is not recommended. Wouldn't a work-around be to rotate my root QML item? If yes, where do I get the physical orientation of the device from? Is there Qt API for that? Thanks for bearing with me. Conny _______________________________________________ MeeGo-dev mailing list MeeGo-dev@meego.com http://lists.meego.com/listinfo/meego-dev http://wiki.meego.com/Mailing_list_guidelines --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ MeeGo-dev mailing list MeeGo-dev@meego.com http://lists.meego.com/listinfo/meego-dev http://wiki.meego.com/Mailing_list_guidelines