<div class="gmail_quote">On Wed, May 26, 2010 at 6:27 PM, Felipe Crochik <span dir="ltr">&lt;<a href="mailto:felipe@crochik.com">felipe@crochik.com</a>&gt;</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 &quot;autorotating&quot; after I click on the<br>
application title to show the menu for the first time. I don&#39;t have to<br>
select anything and I don&#39;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&#39;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 &lt;QApplication&gt;<br>
#include &lt;QMainWindow&gt;<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 &lt;<a href="mailto:felipe@crochik.com">felipe@crochik.com</a>&gt; wrote:<br>
&gt; Now that PR1.2 is out autorotation works!!! Great but.<br>
&gt; Has anybody figured out how to control the autorotation on the application<br>
&gt; (without the &quot;Ctrl+shift+r&quot;)?<br>
&gt;<br>
&gt; The WA_Maemo5AutoOrientation only tells &quot;the device&quot; that you want this<br>
&gt; application to autorotate but the user still needs to press the &quot;shortcut&quot;<br>
&gt; (I have the worst time with my fat fingers) to activate/deactivate it. And<br>
&gt; worst of all you need to do the same every time you start the application.<br>
&gt; At least I would like to allow the user to save as a setting for later...<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Felipe<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; maemo-developers mailing list<br>
&gt; <a href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a><br>
&gt; <a href="https://lists.maemo.org/mailman/listinfo/maemo-developers" target="_blank">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br>
&gt;<br>
<br>
</div></div></blockquote></div><br>Felipe, you&#39;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&#39;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>