<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">just did a short test (Qt 5.7,
      QuickControls2 APP)<br>
      <br>
      tested Android 6.0.1 on BlackBerry PRIV:<br>
      orientation change works between Portrait and Landscape<br>
      but from Landscape to InvertedLandscape or from InvertedLandscape
      to Landscape there was no signal<br>
      for me no problem - don't have to distinguish<br>
      InvertedPortrait couldn't be tested because my device doesn't
      allow this<br>
      <br>
      tested on iOS 9.3 (iPhone 6s)<br>
      all signals are coming in<br>
      <br>
      ciao<br>
      <br>
      ekke<br>
      <br>
      Am 24.06.16 um 11:40 schrieb Wiktor Grębla:<br>
    </div>
    <blockquote
cite="mid:CAFDUY8JezOu2-kuGxWVn8gNfRGYc5xfP-_e4==sZqintHDBSjw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi guys.
        <div><br>
        </div>
        <div>I've been trying to use orientationChanged signal to react
          on orientation changes but somehow can't get it to work. </div>
        <div><br>
        </div>
        <div>I've seen some old threads with similar reports (Qt-5.3)
          but I'm more keen to believe that I'm doing something wrong
          rather than it's not working.</div>
        <div><br>
        </div>
        <div>I've tried it on Qt-5.6 and now on Qt-5.7:</div>
        <div><br>
        </div>
        <div>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"mainwindow.h"</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"ui_mainwindow.h"</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><QScreen></span></pre>
          <pre style="margin-top:0px;margin-bottom:0px">
</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">MainWindow</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">MainWindow</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">QWidget</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(0,0,0)">parent</span><span style="color:rgb(0,0,0)">)</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">:</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">QMainWindow</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">parent</span><span style="color:rgb(0,0,0)">),</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">ui</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">new</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Ui</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">MainWindow</span><span style="color:rgb(0,0,0)">)</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">{</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">ui</span><span style="color:rgb(0,0,0)">-></span>setupUi<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">);</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">QScreen</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">screen</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span>QGuiApplication<span style="color:rgb(0,0,0)">::</span>primaryScreen<span style="color:rgb(0,0,0)">();</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">connect</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">screen</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">SIGNAL</span><span style="color:rgb(0,0,0)">(</span>orientationChanged<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">Qt</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">ScreenOrientation</span><span style="color:rgb(0,0,0)">)),</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">SLOT</span><span style="color:rgb(0,0,0)">(</span>onRotate<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">Qt</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">ScreenOrientation</span><span style="color:rgb(0,0,0)">)));</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">screen</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">setOrientationUpdateMask</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">Qt</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">PortraitOrientation</span><span style="color:rgb(0,0,0)">|</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Qt</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">LandscapeOrientation</span><span style="color:rgb(0,0,0)">|</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Qt</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">InvertedPortraitOrientation</span><span style="color:rgb(0,0,0)">|</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Qt</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">InvertedLandscapeOrientation</span><span style="color:rgb(0,0,0)">);</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">}</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px">
</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">MainWindow</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">onRotate</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">Qt</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">ScreenOrientation</span><span style="color:rgb(0,0,0)">)</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">{</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">ui</span><span style="color:rgb(0,0,0)">-></span>label<span style="color:rgb(0,0,0)">-></span>setText<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">"Rotated!"</span><span style="color:rgb(0,0,0)">);</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">}</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px">
</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">MainWindow</span><span style="color:rgb(0,0,0)">::~</span><span style="font-style:italic;color:rgb(0,0,0)">MainWindow</span><span style="color:rgb(0,0,0)">()</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">{</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">delete</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">ui</span><span style="color:rgb(0,0,0)">;</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">}</span></pre>
          <pre style="margin-top:0px;margin-bottom:0px">
</pre>
          <pre style="margin-top:0px;margin-bottom:0px">I'll be grateful for any hints or suggestions.</pre>
          <pre style="margin-top:0px;margin-bottom:0px">
</pre>
          <pre style="margin-top:0px;margin-bottom:0px">Cheers,</pre>
          <pre style="margin-top:0px;margin-bottom:0px">W.</pre>
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature" data-smartmail="gmail_signature">Talkers
            are no good doers.<br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Android-development mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Android-development@qt-project.org">Android-development@qt-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/android-development">http://lists.qt-project.org/mailman/listinfo/android-development</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>