<div dir="ltr">I use it on desktop. It's in QtQuick.Controls.<div><a href="http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-applicationwindow.html">http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-applicationwindow.html</a><br>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/17 Jens Persson <span dir="ltr"><<a href="mailto:xerxes2@gmail.com" target="_blank">xerxes2@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>AFAIK there is no such thing as an ApplicationWindow in QtQuick. Where did you find that? It exists in Silica though.<br><br></div>Greets Jens<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div class="h5">
On Sun, Nov 17, 2013 at 1:12 PM, Fabien Castan <span dir="ltr"><<a href="mailto:fabcastan@gmail.com" target="_blank">fabcastan@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr">Oops... Thanks!<div><br></div><div>Now, I have 2 strange things:</div><div><br></div><div>1) If I put all the code into a function, the application stay stuck when I try to close it.</div><div><br></div><div>


<span style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;text-decoration:underline"><a href="https://github.com/buttleofx/" target="_blank">https://github.com/buttleofx/</a></span><span style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;text-decoration:underline">testsQml/tree/</span><span style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;text-decoration:underline">qmlApplicationWindow</span><br>


</div><div>> python3 testQmlApplicationWindow.py </div><div>A</div><div>B</div><div>C</div><div>D</div><div>E</div><div>F</div><Here the application is created, I can use it><br><Now I close the application><div>


Z</div><div><But it stays stuck here... I have to kill it.><br></div><div><br></div><div>The 'print("End")' is never called.</div><div>If I create the QGuiApplication outside of the function, it works fine. Something like:</div>


<div>"</div><div><pre style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);line-height:18px"><div style="padding-left:10px">
<span style="font-weight:bold">if</span> <span>__name__</span> <span style="font-weight:bold">==</span> <span style="color:rgb(221,17,68)">'__main__'</span><span>:</span></div>
<div style="padding-left:10px">    app = TestApp(<span>sys</span><span style="font-weight:bold">.</span><span>argv</span>)</div><div style="padding-left:10px">
    <span>main</span><span>(</span><span>sys</span><span style="font-weight:bold">.</span><span>argv, app</span><span>)</span></div><div style="padding-left:10px">
<span>    app.exec_()</span></div><div style="padding-left:10px"><span>"</span></div></pre></div><div><br></div><div>2) The second problem is that I can't override the notify function of the QGuiApplication.</div>


<div>In my sample code there: <span style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;text-decoration:underline"><a href="https://github.com/buttleofx/" target="_blank">https://github.com/buttleofx/</a></span><span style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;text-decoration:underline">testsQml/tree/</span><span style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;text-decoration:underline">qmlApplicationWindow</span>, the code is commented...</div>


<div>If I uncomment the notify function:</div><div><div>> python3 testQmlApplicationWindow.py </div><div>A</div><div>B</div><div>C</div></div><div><div><It stays stuck here... I have to kill it.><br></div></div>

<div>
<br></div><div>So it stays stuck on the "component.loadUrl()"</div><div><br></div><div><br></div><div>Regards,</div><div>Fabien</div><div><br></div></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">
2013/11/16 Phil Thompson <span dir="ltr"><<a href="mailto:phil@riverbankcomputing.com" target="_blank">phil@riverbankcomputing.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


On Sat, 16 Nov 2013 20:22:50 +0100, Fabien Castan <<a href="mailto:fabcastan@gmail.com" target="_blank">fabcastan@gmail.com</a>><br>
wrote:<br>
<div><div>> Hi,<br>
><br>
> I'm trying to create a qtquick application using PyQt5.<br>
> I would like to use an ApplicationWindow as the top level item of my qml<br>
> file. To do that, I shouldn't use the QQuickView but directly<br>
QQmlComponent<br>
> as it's done here with a non-graphic example:<br>
> <a href="http://pyqt.sourceforge.net/Docs/PyQt5/qml.html" target="_blank">http://pyqt.sourceforge.net/Docs/PyQt5/qml.html</a><br>
><br>
> My sample code:<br>
> <a href="https://github.com/buttleofx/testsQml/tree/qmlApplicationWindow" target="_blank">https://github.com/buttleofx/testsQml/tree/qmlApplicationWindow</a><br>
><br>
> But it crashes:<br>
> A<br>
> B<br>
> C<br>
> D<br>
> QObject::connect: Cannot connect (null)::destroyed(QObject*) to<br>
> QWindow::screenDestroyed(QObject*)<br>
> Erreur de segmentation (core dumped)<br>
><br>
> Same result if I use Window instead of ApplicationWindow.<br>
><br>
> Any idea?<br>
><br>
> Regards,<br>
> Fabien<br>
<br>
</div></div>It's not a non-graphic application. Use a QGuiApplication instead of a<br>
QCoreApplication.<br>
<span><font color="#888888"><br>
Phil<br>
</font></span></blockquote></div><br></div>
</div></div><br></div></div>_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br></div>
</blockquote></div><br></div>