<div class="gmail_quote">On Wed, May 26, 2010 at 6:27 PM, Felipe Crochik <span dir="ltr"><<a href="mailto:felipe@crochik.com">felipe@crochik.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I combined the reply to all post:<br>
<br>
My application seems to start "autorotating" after I click on the<br>
application title to show the menu for the first time. I don't have to<br>
select anything and I don't do anything different on my code about the<br>
implementation of the menu.<br>
<br>
Very odd... I will have to try some different things to see if I can isolate<br>
the problem further.<br>
<br>
@Daniil: The test project works fine on my n900<br>
@Luca: I don't think you need to set on all windows, just the top most seems<br>
to be enough.<br>
@Attila: I did not know that.<br>
<br>
Thank you<br>
<font color="#888888">Felipe<br>
</font><div><div></div><div class="h5"><br>
-----Original Message-----<br>
From: Daniil Ivanov [mailto:<a href="mailto:daniil.ivanov@gmail.com">daniil.ivanov@gmail.com</a>]<br>
Sent: Wednesday, May 26, 2010 11:53 AM<br>
To: Felipe Crochik<br>
Cc: <a href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a><br>
Subject: Re: Qt Autorotation<br>
<br>
Hi Felipe!<br>
<br>
Two things. Autorotation was around since N900 sales release.<br>
And this test app works for me fine in PR 1.2 without pressing anything.<br>
<br>
#include <QApplication><br>
#include <QMainWindow><br>
<br>
int<br>
main (int argc,<br>
char **argv)<br>
{<br>
QApplication app(argc, argv);<br>
QMainWindow win;<br>
win.setAttribute(Qt::WA_Maemo5AutoOrientation, true);<br>
win.show();<br>
<br>
return app.exec();<br>
}<br>
<br>
~Daniil.<br>
<br>
On Wed, May 26, 2010 at 6:21 PM, Felipe Crochik <<a href="mailto:felipe@crochik.com">felipe@crochik.com</a>> wrote:<br>
> Now that PR1.2 is out autorotation works!!! Great but.<br>
> Has anybody figured out how to control the autorotation on the application<br>
> (without the "Ctrl+shift+r")?<br>
><br>
> The WA_Maemo5AutoOrientation only tells "the device" that you want this<br>
> application to autorotate but the user still needs to press the "shortcut"<br>
> (I have the worst time with my fat fingers) to activate/deactivate it. And<br>
> worst of all you need to do the same every time you start the application.<br>
> At least I would like to allow the user to save as a setting for later...<br>
><br>
> Thanks,<br>
> Felipe<br>
><br>
> _______________________________________________<br>
> maemo-developers mailing list<br>
> <a href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a><br>
> <a href="https://lists.maemo.org/mailman/listinfo/maemo-developers" target="_blank">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br>
><br>
<br>
</div></div></blockquote></div><br>Felipe, you're absolutely right: once set the autorotation flag in the topmost window of the stack, the others seem to retain it.<br>Only issue remaining is that once you open a new stacked window, it starts in landscape mode, disregarding current device orientation, *but* its child widgets are layed out respecting the correct screen proportions.<br>
I can check for screen geometry and set the landscape or portrait flag accordingly, but I'm wondering if this will disable the accelerometers from then on (ie: overriding the autorotation flag set before).<br>Any clue on this?<br clear="all">
<br>-- <br>Luca Donaggio<br>