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