<div dir="ltr"><div>Hi,</div><div><br></div><div>I have installed Qt5.4 and compiled PyQt5.4 (with python3.4).</div><div>But I'm stuck when loading a QML file which uses QtQuick.Dialogs.</div><div><br></div><div>Here is a simple QML example:</div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">```</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">import</span><span style="color:rgb(192,192,192)"> </span>QtQuick<span style="color:rgb(192,192,192)"> </span>2.0</pre>
<pre style="margin-top:0px;margin-bottom:0px">import QtQuick.Controls 1.0</pre>
<pre style="margin-top:0px;margin-bottom:0px">import QtQuick.Dialogs 1.2 // works fine if you comment this line</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">ApplicationWindow<span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">root</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)">title</span>:<span style="color:rgb(0,128,0)">"Title"</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">width</span>:<span style="color:rgb(192,192,192)"> </span>1200</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">height</span>:<span style="color:rgb(192,192,192)"> </span>800</pre>
<pre style="margin-top:0px;margin-bottom:0px">}</pre>
<pre style="margin-top:0px;margin-bottom:0px">```</pre></div>
<div><br></div><div>This QML file is loaded without trouble using "qmlscene".</div><div>When I load it from PyQt it remains blocked...</div><div>If I run python3 inside gdb, and kill the process, I get this backtrace:</div><div><br></div><div>(gdb) bt</div><div>#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185</div><div>#1  0x00007fffefffeb03 in QWaitCondition::wait(QMutex*, unsigned long) () from /opt/Qt5.4/5.4/gcc_64/lib/libQt5Core.so.5</div><div>#2  0x00007fffec3d17c2 in ?? () from /opt/Qt5.4/5.4/gcc_64/lib/libQt5Qml.so.5</div><div>#3  0x00007fffec375134 in ?? () from /opt/Qt5.4/5.4/gcc_64/lib/libQt5Qml.so.5</div><div>#4  0x00007fffec375590 in ?? () from /opt/Qt5.4/5.4/gcc_64/lib/libQt5Qml.so.5</div><div>#5  0x00007fffec3586dd in QQmlComponentPrivate::loadUrl(QUrl const&, QQmlComponent::CompilationMode) () from /opt/Qt5.4/5.4/gcc_64/lib/libQt5Qml.so.5</div><div>#6  0x00007fffe923aecf in meth_QQmlComponent_loadUrl () from /usr/lib/python3/dist-packages/PyQt5/QtQml.so</div><div>#7  0x000000000057c7bc in call_function (oparg=<optimized out>, pp_stack=<synthetic pointer>) at ../Python/ceval.c:4227</div><div>#8  PyEval_EvalFrameEx (f=f@entry=0x17ffe98, throwflag=throwflag@entry=0) at ../Python/ceval.c:2829</div><div>#9  0x000000000057c0db in fast_function (nk=<optimized out>, na=2, n=<optimized out>, pp_stack=<synthetic pointer>, func=0x7fffe3fcd840) at ../Python/ceval.c:4324</div><div>#10 call_function (oparg=<optimized out>, pp_stack=<synthetic pointer>) at ../Python/ceval.c:4252</div><div>#11 PyEval_EvalFrameEx (f=f@entry=0x7ffff7f22438, throwflag=throwflag@entry=0) at ../Python/ceval.c:2829</div><div>#12 0x000000000057d3d3 in PyEval_EvalCodeEx (_co=_co@entry=0x7ffff7ee3300, globals=globals@entry=0x7ffff7f1f408, locals=locals@entry=0x7ffff7f1f408, args=args@entry=0x0, argcount=argcount@entry=0, </div><div>    kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0) at ../Python/ceval.c:3578</div><div>#13 0x000000000060ba83 in PyEval_EvalCode (locals=0x7ffff7f1f408, globals=0x7ffff7f1f408, co=0x7ffff7ee3300) at ../Python/ceval.c:773</div><div>#14 run_mod (arena=0xaadcd0, flags=0x7fffffffdad0, locals=0x7ffff7f1f408, globals=0x7ffff7f1f408, filename=0x7ffff7e23710, mod=0xacb200) at ../Python/pythonrun.c:2179</div><div>#15 PyRun_FileExFlags (fp=0xa4a230, filename_str=<optimized out>, start=<optimized out>, globals=0x7ffff7f1f408, locals=0x7ffff7f1f408, closeit=1, flags=0x7fffffffdad0) at ../Python/pythonrun.c:2132</div><div>#16 0x000000000060bc85 in PyRun_SimpleFileExFlags (fp=fp@entry=0xa4a230, filename=<optimized out>, filename@entry=0x7ffff7e249e0 "/home/fab/dev/ButtleOFX/buttleApp.py", closeit=closeit@entry=1, </div><div>    flags=flags@entry=0x7fffffffdad0) at ../Python/pythonrun.c:1605</div><div>#17 0x000000000060d3ac in PyRun_AnyFileExFlags (flags=0x7fffffffdad0, closeit=<optimized out>, filename=<optimized out>, fp=0xa4a230) at ../Python/pythonrun.c:1292</div><div>#18 run_file (p_cf=0x7fffffffdad0, filename=0x9fd280 L"/home/fab/dev/ButtleOFX/buttleApp.py", fp=0xa4a230) at ../Modules/main.c:319</div><div>#19 Py_Main (argc=argc@entry=2, argv=argv@entry=0x9fc010) at ../Modules/main.c:751</div><div>#20 0x000000000041ec0d in main (argc=2, argv=<optimized out>) at ../Modules/python.c:69</div><div><br></div><div>With:</div><div>export QML_IMPORT_TRACE=1<br></div><div>The output is:</div><div><div>QQmlImports(file:////home/fab/dev/ButtleOFX/buttleofx/MainWindow.qml)::addLibraryImport: "QtQuick" 2.0 as ""</div><div>QQmlImports(file:////home/fab/dev/ButtleOFX/buttleofx/MainWindow.qml)::importExtension: loaded "/opt/Qt5.4/5.4/gcc_64/qml/QtQuick.2/qmldir"</div><div>QQmlImportDatabase::registerPluginTypes: "QtQuick" from "/opt/Qt5.4/5.4/gcc_64/qml/QtQuick.2"</div><div>QQmlImports(file:////home/fab/dev/ButtleOFX/buttleofx/MainWindow.qml)::addLibraryImport: "QtQuick.Controls" 1.0 as ""</div><div>QQmlImports(file:////home/fab/dev/ButtleOFX/buttleofx/MainWindow.qml)::importExtension: loaded "/opt/Qt5.4/5.4/gcc_64/qml/QtQuick/Controls/qmldir"</div><div>QQmlImportDatabase::registerPluginTypes: "QtQuick.Controls" from "/opt/Qt5.4/5.4/gcc_64/qml/QtQuick/Controls"</div><div>QQmlImports(file:////home/fab/dev/ButtleOFX/buttleofx/MainWindow.qml)::addLibraryImport: "QtQuick.Dialogs" 1.2 as ""</div><div>QQmlImports(file:////home/fab/dev/ButtleOFX/buttleofx/MainWindow.qml)::importExtension: loaded "/opt/Qt5.4/5.4/gcc_64/qml/QtQuick/Dialogs/qmldir"</div><div>QQmlImportDatabase::registerPluginTypes: "QtQuick.Dialogs" from "/opt/Qt5.4/5.4/gcc_64/qml/QtQuick/Dialogs"</div><div><br></div></div><div>Regards,</div><div>Fabien</div><div><br></div></div>