<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Anyone? <br>
</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<br>
</li>
</ul>
<p>It may well be a stupid question, I am afraid. I am no pro at
all. <br>
</p>
<p>TIA for your time and attention!<br>
</p>
<p>Best regards,</p>
<p>Sebastian<br>
</p>
<br>
<div class="moz-cite-prefix">Am 18.08.2016 um 12:00 schrieb <a
class="moz-txt-link-abbreviated"
href="mailto:info@classintouch.de">info@classintouch.de</a>:<br>
</div>
<blockquote
cite="mid:41cc63a9-bd84-99e6-5f43-33707b8674b5@funkmachine.de"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
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:#800080;"> @new QQuickView</span><span
style=" color:#000000;">(</span><span style=" color:#000000;">)@</span><br>
<span style=" color:#000000;">as well as <br>
</span><span style=" color:#800080;"> @new QQuickView</span><span
style=" color:#000000;">(</span><span style=" color:#008000;">controller->engine(),</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><span
style=" color:#000000;"></span><span style=" color:#008000;">controller</span>->topLevelWindow()</span><span
style=" color:#000000;">)@<br>
</span>(topLevelWindow() returns a QQuickWindow, engine() returns
a <span style=" color:#000000;">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:<br>
<br>
</span><span style=" color:#808000;">@void</span><span style="
color:#c0c0c0;"> </span><span style=" color:#800080;">AbstractApp</span><span
style=" color:#000000;">::</span><span style="
font-style:italic; color:#000000;">openIncEditView</span><span
style=" color:#000000;">(</span><span style=" color:#800080;">QString</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#000000;">title</span><span
style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span
style=" color:#800080;">QString</span><span style="
color:#c0c0c0;"> </span><span style=" color:#000000;">interfaceName</span><span
style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span
style=" color:#800080;">QVariant</span><span style="
color:#c0c0c0;"> </span><span style=" color:#000000;">interfaceVariant</span><span
style=" color:#000000;">)</span>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;">{
</span><span style=" color:#800000;"> m_incEditView</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">MyQQuickView</span><span style=" color:#000000;">();</span>
</pre>
<span style=" color:#c0c0c0;"> </span><span style="
color:#800000;">m_incEditView</span><span style="
color:#000000;">-></span><span style=" color:#000000;">setResizeMode</span><span
style=" color:#000000;">(</span><span style=" color:#800080;">QQuickView</span><span
style=" color:#000000;">::</span><span style=" color:#800080;">SizeRootObjectToView</span><span
style=" color:#000000;">);</span>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">m_incEditView</span><span style=" color:#000000;">-></span><span style=" color:#000000;">setWidth</span><span style=" color:#000000;">(</span><span style=" color:#000080;">500</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">m_incEditView</span><span style=" color:#000000;">-></span><span style=" color:#000000;">setHeight</span><span style=" color:#000000;">(</span><span style=" color:#000080;">200</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">m_incEditView</span><span style=" color:#000000;">-></span><span style=" color:#000000;">setModality</span><span style=" color:#000000;">(</span><span style=" color:#800080;">Qt</span><span style=" color:#000000;">::</span><span style=" color:#800080;">ApplicationModal</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">m_incEditView</span><span style=" color:#000000;">-></span><span style=" color:#000000;">setFlags</span><span style=" color:#000000;">(</span><span style=" color:#800080;">Qt</span><span style=" color:#000000;">::</span><span style=" color:#800080;">Dialog</span><span style=" color:#000000;">);</span></pre>
<span style=" color:#c0c0c0;"> </span><span style="
color:#800000;">m_incEditView</span><span style="
color:#000000;">-></span><span style=" color:#000000;">setSource</span><span
style=" color:#000000;">(</span><span style=" color:#800080;">QUrl</span><span
style=" color:#000000;">(</span><span style=" color:#008000;">"qrc:/qml/qml/IncEdit.qml"</span><span
style=" color:#000000;">));</span>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">m_incEditView</span><span style=" color:#000000;">-></span><span style=" color:#000000;">show</span><span style=" color:#000000;">();</span></pre>
<span style=" color:#000000;">}@</span> <br>
<br>
I init my main window this way (shortened for readability):<br>
@
<p><span style=" color:#808000;">bool</span><span style="
color:#c0c0c0;"> </span><span style=" color:#800080;">Controller</span><span
style=" color:#000000;">::</span><span style=" color:#000000;">initView</span><span
style=" color:#000000;">()</span><span style=" color:#c0c0c0;">
</span><span style=" color:#000000;">{</span> </p>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">m_component</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QSharedPointer</span><span style=" color:#000000;"><</span><span style=" color:#800080;">QQmlComponent</span><span style=" color:#000000;">>(</span><span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QQmlComponent</span><span style=" color:#000000;">(</span><span style=" color:#000000;">&</span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">m_engine</span><span style=" color:#000000;">));</span></pre>
<span style=" color:#c0c0c0;"> </span><span style="
color:#800000;">m_component</span><span style=" color:#000000;">-></span><span
style=" color:#000000;">loadUrl</span><span style="
color:#000000;">(</span><span style=" color:#800080;">QUrl</span><span
style=" color:#000000;">(</span><span style=" color:#000080;">QStringLiteral</span><span
style=" color:#000000;">(</span><span style=" color:#008000;">"qrc:/qml/qml/main.qml"</span><span
style=" color:#000000;">)));</span><span style=" color:#c0c0c0;">
</span><span style=" color:#800000;"><br>
m_topLevel</span><span style=" color:#c0c0c0;"> </span><span
style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span
style=" color:#800080;">QSharedPointer</span><span style="
color:#000000;"><</span><span style=" color:#800080;">QObject</span><span
style=" color:#000000;">>(</span><span style="
color:#800000;">m_component</span><span style=" color:#000000;">-></span><span
style=" font-style:italic; color:#000000;">create</span><span
style=" color:#000000;">());</span><br>
<span style=" color:#800000;">m_window</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#000000;">qobject_cast</span><span
style=" color:#000000;"><</span><span style=" color:#800080;">QQuickWindow</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*>(</span><span
style=" color:#800000;">m_topLevel</span><span style="
color:#000000;">.</span><span style=" color:#000000;">data</span><span
style=" color:#000000;">());</span><span style=" color:#c0c0c0;"><br>
</span><span style=" color:#800000;">m_window</span><span
style=" color:#000000;">-></span><span style="
color:#000000;">showMaximized</span><span style="
color:#000000;">();</span><span style=" color:#000000;"></span><span
style=" color:#c0c0c0;"><br>
</span><span style=" color:#808000;">return</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#808000;">true</span><span
style=" color:#000000;">;</span>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;">}@</span></pre>
<br>
Kind regards,<br>
Sebastian<br>
<pre class="moz-signature" cols="72">--
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.classintouch.de">http://www.classintouch.de</a> - Tablet-Software für Lehrer</pre>
<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>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.classintouch.de">http://www.classintouch.de</a> - Tablet-Software für Lehrer</pre>
</body>
</html>