<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>I don't really understand, so  was not chiming in. AFAIK, Android's windowing is not like other platforms. It's got it's own display manager. I'm not sure of the level of integration that Qt has with it. AFAIK, you'll have to create the dialog in your own app as QML window and show it all within QML.  That's because the Android UI and the Qt UI are in different threads and you have a GL surface that Qt is rendering to, being displayed in the Activity.</div>

<div>If you want to pop dialogs, you'll need to extend QtActivity. </div>

<div> </div>

<div>But be warned. I could be completely wrong. </div>

<div> </div>

<div> </div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b> Tuesday, August 23, 2016 at 5:50 AM<br/>
<b>From:</b> info@classintouch.de<br/>
<b>To:</b> android-development@qt-project.org<br/>
<b>Subject:</b> Re: [Android-development] QQuickView dialog hidden behind QML ApplicationWindow on Android</div>

<div name="quoted-content">
<div style="background-color: rgb(255,255,255);">
<p>Anyone?</p>

<p>Android seems to behave quite differently here (compared to Windows) and I haven't found a feasible workaround - except from instantiating dialogs from QML, which is not flexible enough for my needs.</p>

<ul>
        <li>Qt 5.5.1  (I can't upgrade Qt yet, because of a dependency with issues on >= 5.6)</li>
        <li>Win10 build system</li>
        <li>GCC 4.9, armeabi-v7a, SDK is android-23</li>
        <li>devices: SGS5, Nexus 10</li>
</ul>

<p>It may well be a stupid question, I am afraid. I am no pro at all.</p>

<p>TIA for your time and attention!</p>

<p>Best regards,</p>

<p>Sebastian</p>
 

<div class="moz-cite-prefix">Am 18.08.2016 um 12:00 schrieb <a class="moz-txt-link-abbreviated" href="info@classintouch.de" target="_parent">info@classintouch.de</a>:</div>

<blockquote>Hi,<br/>
I have a project without widgets. Opening a QQuickView as a modal dialog works fine on Windows.<br/>
On Android, though, the QQuickView is hidden behind the main window (which is of QML type "ApplicationWindow").<br/>
I've tried<br/>
<span style="color: rgb(128,0,128);">    @new QQuickView</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(0,0,0);">)@</span><br/>
<span style="color: rgb(0,0,0);">as well as </span><br/>
<span style="color: rgb(128,0,128);">    @new QQuickView</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(0,128,0);">controller->engine(),</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(0,128,0);"><span style="color: rgb(0,128,0);">controller</span>->topLevelWindow()</span><span style="color: rgb(0,0,0);">)@</span><br/>
(topLevelWindow() returns a QQuickWindow, engine() returns a <span style="color: rgb(0,0,0);">QQmlApplicationEngine)<br/>
<br/>
I've also played around with WindowFlags - to no avail.<br/>
<br/>
Any idea on how to bring the QuickView to the front?<br/>
-------------------------------------------------------------------------------<br/>
More info:<br/>
<br/>
With swapping active Apps around on my phone I can bring the dialog to the front, but I have not succeeded to do that programmatically.<br/>
This is how I open the Dialog:</span><br/>
<br/>
<span style="color: rgb(128,128,0);">@void</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(128,0,128);">AbstractApp</span><span style="color: rgb(0,0,0);">::</span><span style="font-style: italic;color: rgb(0,0,0);">openIncEditView</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(128,0,128);">QString</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(0,0,0);">title</span><span style="color: rgb(0,0,0);">,</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(128,0,128);">QString</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(0,0,0);">interfaceName</span><span style="color: rgb(0,0,0);">,</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(128,0,128);">QVariant</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(0,0,0);">interfaceVariant</span><span style="color: rgb(0,0,0);">)</span>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;margin-left: 0.0px;margin-right: 0.0px;text-indent: 0.0px;"><span style="color: rgb(0,0,0);">{
</span><span style="color: rgb(128,0,0);">    m_incEditView</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(128,128,0);">new</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(128,0,128);">MyQQuickView</span><span style="color: rgb(0,0,0);">();</span>
</pre>
<span style="color: rgb(192,192,192);">        </span><span style="color: rgb(128,0,0);">m_incEditView</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">setResizeMode</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(128,0,128);">QQuickView</span><span style="color: rgb(0,0,0);">::</span><span style="color: rgb(128,0,128);">SizeRootObjectToView</span><span style="color: rgb(0,0,0);">);</span>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;margin-left: 0.0px;margin-right: 0.0px;text-indent: 0.0px;"><span style="color: rgb(192,192,192);">    </span><span style="color: rgb(128,0,0);">m_incEditView</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">setWidth</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(0,0,128);">500</span><span style="color: rgb(0,0,0);">);</span></pre>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;margin-left: 0.0px;margin-right: 0.0px;text-indent: 0.0px;"><span style="color: rgb(192,192,192);">    </span><span style="color: rgb(128,0,0);">m_incEditView</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">setHeight</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(0,0,128);">200</span><span style="color: rgb(0,0,0);">);</span></pre>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;margin-left: 0.0px;margin-right: 0.0px;text-indent: 0.0px;"><span style="color: rgb(192,192,192);">    </span><span style="color: rgb(128,0,0);">m_incEditView</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">setModality</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);">ApplicationModal</span><span style="color: rgb(0,0,0);">);</span></pre>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;margin-left: 0.0px;margin-right: 0.0px;text-indent: 0.0px;"><span style="color: rgb(192,192,192);">    </span><span style="color: rgb(128,0,0);">m_incEditView</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">setFlags</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);">Dialog</span><span style="color: rgb(0,0,0);">);</span></pre>
<span style="color: rgb(192,192,192);">        </span><span style="color: rgb(128,0,0);">m_incEditView</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">setSource</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(128,0,128);">QUrl</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(0,128,0);">"qrc:/qml/qml/IncEdit.qml"</span><span style="color: rgb(0,0,0);">));</span>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;margin-left: 0.0px;margin-right: 0.0px;text-indent: 0.0px;"><span style="color: rgb(192,192,192);">    </span><span style="color: rgb(128,0,0);">m_incEditView</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">show</span><span style="color: rgb(0,0,0);">();</span></pre>
<span style="color: rgb(0,0,0);">}@</span><br/>
<br/>
I init my main window this way (shortened for readability):<br/>
@
<p><span style="color: rgb(128,128,0);">bool</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(128,0,128);">Controller</span><span style="color: rgb(0,0,0);">::</span><span style="color: rgb(0,0,0);">initView</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></p>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;margin-left: 0.0px;margin-right: 0.0px;text-indent: 0.0px;"><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(128,0,0);">m_component</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(128,0,128);">QSharedPointer</span><span style="color: rgb(0,0,0);"><</span><span style="color: rgb(128,0,128);">QQmlComponent</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);">QQmlComponent</span><span style="color: rgb(0,0,0);">(</span><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><span style="color: rgb(128,0,0);">m_engine</span><span style="color: rgb(0,0,0);">));</span></pre>
<span style="color: rgb(192,192,192);">        </span><span style="color: rgb(128,0,0);">m_component</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">loadUrl</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(128,0,128);">QUrl</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(0,0,128);">QStringLiteral</span><span style="color: rgb(0,0,0);">(</span><span style="color: rgb(0,128,0);">"qrc:/qml/qml/main.qml"</span><span style="color: rgb(0,0,0);">)));</span><span style="color: rgb(192,192,192);"> </span><br/>
<span style="color: rgb(128,0,0);">        m_topLevel</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(128,0,128);">QSharedPointer</span><span style="color: rgb(0,0,0);"><</span><span style="color: rgb(128,0,128);">QObject</span><span style="color: rgb(0,0,0);">>(</span><span style="color: rgb(128,0,0);">m_component</span><span style="color: rgb(0,0,0);">-></span><span style="font-style: italic;color: rgb(0,0,0);">create</span><span style="color: rgb(0,0,0);">());</span><br/>
        <span style="color: rgb(128,0,0);">m_window</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);">qobject_cast</span><span style="color: rgb(0,0,0);"><</span><span style="color: rgb(128,0,128);">QQuickWindow</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(0,0,0);">*>(</span><span style="color: rgb(128,0,0);">m_topLevel</span><span style="color: rgb(0,0,0);">.</span><span style="color: rgb(0,0,0);">data</span><span style="color: rgb(0,0,0);">());</span><br/>
<span style="color: rgb(192,192,192);">        </span><span style="color: rgb(128,0,0);">m_window</span><span style="color: rgb(0,0,0);">-></span><span style="color: rgb(0,0,0);">showMaximized</span><span style="color: rgb(0,0,0);">();</span><br/>
<span style="color: rgb(192,192,192);">         </span><span style="color: rgb(128,128,0);">return</span><span style="color: rgb(192,192,192);"> </span><span style="color: rgb(128,128,0);">true</span><span style="color: rgb(0,0,0);">;</span>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;margin-left: 0.0px;margin-right: 0.0px;text-indent: 0.0px;"><span style="color: rgb(0,0,0);">}@</span></pre>
<br/>
Kind regards,<br/>
Sebastian
<pre class="moz-signature">-- 
<a class="moz-txt-link-freetext" href="http://www.classintouch.de" target="_blank">http://www.classintouch.de</a> - Tablet-Software für Lehrer</pre>
 

<fieldset class="mimeAttachmentHeader"> </fieldset>
 

<pre>_______________________________________________
Android-development mailing list
<a class="moz-txt-link-abbreviated" href="Android-development@qt-project.org" target="_parent">Android-development@qt-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/android-development" target="_blank">http://lists.qt-project.org/mailman/listinfo/android-development</a>
</pre>
</blockquote>
 

<pre class="moz-signature">-- 
<a class="moz-txt-link-freetext" href="http://www.classintouch.de" target="_blank">http://www.classintouch.de</a> - Tablet-Software für Lehrer</pre>
_______________________________________________ Android-development mailing list Android-development@qt-project.org <a href="http://lists.qt-project.org/mailman/listinfo/android-development" target="_blank">http://lists.qt-project.org/mailman/listinfo/android-development</a></div>
</div>
</div>
</div>
</div></div></body></html>