[PyQt] Custom widgets in Qt5

Vincent Vande Vyvre vincent.vandevyvre at swing.be
Thu Jun 6 11:52:55 BST 2013


Le 05/06/2013 23:13, Phil Thompson a écrit :
> In PyQt5 the plugin is called libpyqt5.so. Which directory it goes in 
> depends on how your Qt5 installation is configured. Phil 
I don't know why but the Makefile was not created in 
.../PyQt-gpl-5.0-snapshot-cdc78cf84e0d/designer/

So, I've re-run the configure.py and the make and make install only for 
the designer.

Now the lib libpyqt5.so is in 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/plugins/designer/ but the Designer crash 
at launching with any of my custom widgets and also with the 
geolocationwidget example provided here:
http://doc.qt.digia.com/qq/qq26-pyqtdesigner.html

I've tried all my widgets separately, this is the feedback of the command
------------------------------------------------------------------------
vincent at djoliba:~$ /usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer
QMetaType::registerType: Binary compatibility break -- Size mismatch for 
type 'QPaintBufferCacheEntry' [1024]. Previously registered size 16, now 
registering size 0.
Abandon (core dumped)
------------------------------------------------------------------------

Except for one widget wich I've had this backtrace:
------------------------------------------------------------------------
vincent at djoliba:~$ /usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer
*** glibc detected *** /usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer: 
realloc(): invalid pointer: 0x00007ff7989ef340 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7ff797d8db96]
/lib/x86_64-linux-gnu/libc.so.6(realloc+0x2de)[0x7ff797d9293e]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(_ZN9QListData7reallocEi+0x26)[0x7ff798482e46]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(_ZN9QListData6appendEi+0x65)[0x7ff798482f05]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(+0x80d76)[0x7ff79844ed76]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(+0x7f4a7)[0x7ff79844d4a7]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(+0x7fd25)[0x7ff79844dd25]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(+0x7feae)[0x7ff79844deae]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(_Z20qMessageFormatString9QtMsgTypeRK18QMessageLogContextRK7QString+0x4e)[0x7ff79844dfae]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(+0x806f5)[0x7ff79844e6f5]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(+0x7e07c)[0x7ff79844c07c]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(+0x7e19a)[0x7ff79844c19a]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(_ZNK14QMessageLogger5fatalEPKcz+0xa9)[0x7ff79844c8c9]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(_ZN9QMetaType22registerNormalizedTypeERK10QByteArrayPFvPvEPFS3_PKvES5_PFS3_S3_S7_Ei6QFlagsINS_8TypeFlagEEPK11QMetaObject+0x48a)[0x7ff798600bba]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(_ZN9QMetaType12registerTypeEPKcPFvPvEPFS2_PKvES4_PFS2_S2_S6_Ei6QFlagsINS_8TypeFlagEEPK11QMetaObject+0x61)[0x7ff798600c51]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(_ZN9QMetaType12registerTypeEPKcPFvPvEPFS2_PKvE+0x2a)[0x7ff798600cea]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x1b8efe)[0x7ff775014efe]
/lib64/ld-linux-x86-64.so.2(+0xf306)[0x7ff79aba4306]
/lib64/ld-linux-x86-64.so.2(+0xf3df)[0x7ff79aba43df]
/lib64/ld-linux-x86-64.so.2(+0x13ada)[0x7ff79aba8ada]
/lib64/ld-linux-x86-64.so.2(+0xf176)[0x7ff79aba4176]
/lib64/ld-linux-x86-64.so.2(+0x1331a)[0x7ff79aba831a]
/lib/x86_64-linux-gnu/libdl.so.2(+0xf26)[0x7ff796583f26]
/lib64/ld-linux-x86-64.so.2(+0xf176)[0x7ff79aba4176]
/lib/x86_64-linux-gnu/libdl.so.2(+0x152f)[0x7ff79658452f]
/lib/x86_64-linux-gnu/libdl.so.2(dlopen+0x31)[0x7ff796583fc1]
/usr/lib/libpython3.2mu.so.1.0(_PyImport_GetDynLoadFunc+0x121)[0x7ff7850facf1]
/usr/lib/libpython3.2mu.so.1.0(_PyImport_LoadDynamicModule+0xd5)[0x7ff785061725]
/usr/lib/libpython3.2mu.so.1.0(+0x1b43a2)[0x7ff7851a83a2]
/usr/lib/libpython3.2mu.so.1.0(+0x10714f)[0x7ff7850fb14f]
/usr/lib/libpython3.2mu.so.1.0(+0x1b4a84)[0x7ff7851a8a84]
/usr/lib/libpython3.2mu.so.1.0(PyImport_ImportModuleLevel+0x3a)[0x7ff7851a8fba]
/usr/lib/libpython3.2mu.so.1.0(+0x6804f)[0x7ff78505c04f]
/usr/lib/libpython3.2mu.so.1.0(PyObject_Call+0x7e)[0x7ff78511e0be]
/usr/lib/libpython3.2mu.so.1.0(PyEval_CallObjectWithKeywords+0x47)[0x7ff785186b57]
/usr/lib/libpython3.2mu.so.1.0(PyEval_EvalFrameEx+0x21d9)[0x7ff78506ded9]
/usr/lib/libpython3.2mu.so.1.0(PyEval_EvalCodeEx+0x6a6)[0x7ff7851a5a66]
/usr/lib/libpython3.2mu.so.1.0(PyEval_EvalCode+0x3b)[0x7ff7851a5f0b]
/usr/lib/libpython3.2mu.so.1.0(PyImport_ExecCodeModuleWithPathnames+0x115)[0x7ff7851a6025]
/usr/lib/libpython3.2mu.so.1.0(+0x1b3d71)[0x7ff7851a7d71]
/usr/lib/libpython3.2mu.so.1.0(+0x1b43a2)[0x7ff7851a83a2]
/usr/lib/libpython3.2mu.so.1.0(+0x10714f)[0x7ff7850fb14f]
/usr/lib/libpython3.2mu.so.1.0(+0x1b4a3f)[0x7ff7851a8a3f]
/usr/lib/libpython3.2mu.so.1.0(PyImport_ImportModuleLevel+0x3a)[0x7ff7851a8fba]
/usr/lib/libpython3.2mu.so.1.0(+0x6804f)[0x7ff78505c04f]
/usr/lib/libpython3.2mu.so.1.0(PyObject_Call+0x7e)[0x7ff78511e0be]
/usr/lib/libpython3.2mu.so.1.0(+0x92c6b)[0x7ff785086c6b]
/usr/lib/libpython3.2mu.so.1.0(PyObject_CallFunction+0x7e)[0x7ff78508c3de]
/usr/lib/libpython3.2mu.so.1.0(PyImport_Import+0xc1)[0x7ff7851a90f1]
/usr/lib/libpython3.2mu.so.1.0(PyImport_ImportModule+0x1c)[0x7ff7851a92ec]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/plugins/designer/libpyqt5.so(_ZN15PyCustomWidgetsC2EP7QObject+0xea1)[0x7ff78554a011]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/plugins/designer/libpyqt5.so(qt_plugin_instance+0xcf)[0x7ff78554b56f]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Core.so.5(_ZN13QPluginLoader8instanceEv+0x4b)[0x7ff7985de9eb]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Designer.so.5(_ZNK22QDesignerPluginManager8instanceERK7QString+0x36)[0x7ff799ee27a6]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/../lib/libQt5Designer.so.5(_ZNK22QDesignerPluginManager9instancesEv+0x77)[0x7ff799ee5cd7]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer[0x430890]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer[0x43221c]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer[0x42b60b]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer[0x42c121]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer[0x418bd3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7ff797d3076d]
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer[0x418c81]
======= Memory map: ========
00400000-00464000 r-xp 00000000 08:01 487171 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer
00663000-00668000 r--p 00063000 08:01 487171 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer
00668000-0066a000 rw-p 00068000 08:01 487171 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/bin/designer
01060000-0156f000 rw-p 00000000 00:00 0                                  
[heap]
7ff773ee5000-7ff773ee9000 r-xp 00000000 08:01 395734                     
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ff773ee9000-7ff7740e8000 ---p 00004000 08:01 395734                     
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ff7740e8000-7ff7740e9000 r--p 00003000 08:01 395734                     
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ff7740e9000-7ff7740ea000 rw-p 00004000 08:01 395734                     
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ff7740ea000-7ff774149000 r-xp 00000000 08:01 2219                       
/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0
7ff774149000-7ff774349000 ---p 0005f000 08:01 2219                       
/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0
7ff774349000-7ff77434a000 r--p 0005f000 08:01 2219                       
/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0
7ff77434a000-7ff77434f000 rw-p 00060000 08:01 2219                       
/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0
7ff77434f000-7ff774350000 rw-p 00000000 00:00 0
7ff774350000-7ff774366000 r-xp 00000000 08:01 10448                      
/usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7ff774366000-7ff774565000 ---p 00016000 08:01 10448                      
/usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7ff774565000-7ff774566000 r--p 00015000 08:01 10448                      
/usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7ff774566000-7ff774567000 rw-p 00016000 08:01 10448                      
/usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7ff774567000-7ff77456a000 rw-p 00000000 00:00 0
7ff77456a000-7ff774571000 r-xp 00000000 08:01 10491                      
/usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7ff774571000-7ff774770000 ---p 00007000 08:01 10491                      
/usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7ff774770000-7ff774771000 r--p 00006000 08:01 10491                      
/usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7ff774771000-7ff774772000 rw-p 00007000 08:01 10491                      
/usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7ff774772000-7ff774789000 r-xp 00000000 08:01 10562                      
/usr/lib/x86_64-linux-gnu/libaudio.so.2.4
7ff774789000-7ff774988000 ---p 00017000 08:01 10562                      
/usr/lib/x86_64-linux-gnu/libaudio.so.2.4
7ff774988000-7ff774989000 r--p 00016000 08:01 10562                      
/usr/lib/x86_64-linux-gnu/libaudio.so.2.4
7ff774989000-7ff77498a000 rw-p 00017000 08:01 10562                      
/usr/lib/x86_64-linux-gnu/libaudio.so.2.4
7ff77498a000-7ff774c50000 r-xp 00000000 08:01 2097 
/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.1
7ff774c50000-7ff774e4f000 ---p 002c6000 08:01 2097 
/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.1
7ff774e4f000-7ff774e5a000 r--p 002c5000 08:01 2097 
/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.1
7ff774e5a000-7ff774e5b000 rw-p 002d0000 08:01 2097 
/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.1
7ff774e5b000-7ff774e5c000 rw-p 00000000 00:00 0
7ff774e5c000-7ff7758dd000 r-xp 00000000 08:01 2110 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1
7ff7758dd000-7ff775add000 ---p 00a81000 08:01 2110 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1
7ff775add000-7ff775b1f000 r--p 00a81000 08:01 2110 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1
7ff775b1f000-7ff775b26000 rw-p 00ac3000 08:01 2110 
/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.1
7ff775b26000-7ff775b2a000 rw-p 00000000 00:00 0
7ff775b2a000-7ff776111000 r-xp 00000000 08:01 185603 
/usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-32mu.so
7ff776111000-7ff776311000 ---p 005e7000 08:01 185603 
/usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-32mu.so
7ff776311000-7ff776327000 r--p 005e7000 08:01 185603 
/usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-32mu.so
7ff776327000-7ff776415000 rw-p 005fd000 08:01 185603 
/usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-32mu.so
7ff776415000-7ff77642f000 r-xp 00000000 08:01 185481 
/usr/lib/python3/dist-packages/sip.cpython-32mu.so
7ff77642f000-7ff77662e000 ---p 0001a000 08:01 185481 
/usr/lib/python3/dist-packages/sip.cpython-32mu.so
7ff77662e000-7ff77662f000 r--p 00019000 08:01 185481 
/usr/lib/python3/dist-packages/sip.cpython-32mu.so
7ff77662f000-7ff776631000 rw-p 0001a000 08:01 185481 
/usr/lib/python3/dist-packages/sip.cpython-32mu.so
7ff776631000-7ff7766b3000 rw-p 00000000 00:00 0
7ff7766b3000-7ff776acd000 r-xp 00000000 08:01 487337 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5V8.so.5.0.2
7ff776acd000-7ff776ccd000 ---p 0041a000 08:01 487337 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5V8.so.5.0.2
7ff776ccd000-7ff776cf5000 r--p 0041a000 08:01 487337 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5V8.so.5.0.2
7ff776cf5000-7ff776cfa000 rw-p 00442000 08:01 487337 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5V8.so.5.0.2
7ff776cfa000-7ff776cfd000 rw-p 00000000 00:00 0
7ff776cfd000-7ff776d72000 r-xp 00000000 08:01 10909 
/usr/lib/x86_64-linux-gnu/liborc-0.4.so.0.16.0
7ff776d72000-7ff776f71000 ---p 00075000 08:01 10909 
/usr/lib/x86_64-linux-gnu/liborc-0.4.so.0.16.0
7ff776f71000-7ff776f73000 r--p 00074000 08:01 10909 
/usr/lib/x86_64-linux-gnu/liborc-0.4.so.0.16.0
7ff776f73000-7ff776f78000 rw-p 00076000 08:01 10909 
/usr/lib/x86_64-linux-gnu/liborc-0.4.so.0.16.0
7ff776f78000-7ff7771a4000 r-xp 00000000 08:01 487326 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5Qml.so.5.0.2
7ff7771a4000-7ff7773a3000 ---p 0022c000 08:01 487326 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5Qml.so.5.0.2
7ff7773a3000-7ff7773b2000 r--p 0022b000 08:01 487326 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5Qml.so.5.0.2
7ff7773b2000-7ff7773b8000 rw-p 0023a000 08:01 487326 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5Qml.so.5.0.2
7ff7773b8000-7ff7776df000 r-xp 00000000 08:01 487327 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5Quick.so.5.0.2
7ff7776df000-7ff7778de000 ---p 00327000 08:01 487327 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5Quick.so.5.0.2
7ff7778de000-7ff7778fe000 r--p 00326000 08:01 487327 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5Quick.so.5.0.2
7ff7778fe000-7ff77791c000 rw-p 00346000 08:01 487327 
/usr/lib/Qt5.0.2/5.0.2/gcc_64/lib/libQt5Quick.so.5.0.2
7ff77791c000-7ff77791e000 rw-p 00000000 00:00 0
7ff77791e000-7ff7779bc000 r-xp 00000000 08:01 157 
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7ff7779bc000-7ff777bbc000 ---p 0009e000 08:01 157 
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7ff777bbc000-7ff777bbe000 r--p 0009e000 08:01 157 
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7ff777bbe000-7ff777bc0000 rw-p 000a0000 08:01 157 
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7ff777bc0000-7ff777bc1000 rw-p 00000000 00:00 0
7ff777bc1000-7ff777bdb000 r-xp 00000000 08:01 1907 
/usr/lib/x86_64-linux-gnu/libgstvideo-0.10.so.0.25.0
7ff777bdb000-7ff777ddb000 ---p 0001a000 08:01 1907 
/usr/lib/x86_64-linux-gnu/libgstvideo-0.10.so.0.25.0
7ff777ddb000-7ff777ddc000 r--p 0001a000 08:01 1907 
/usr/lib/x86_64-linux-gnu/libgstvideo-0.10.so.0.25.0
7ff777ddc000-7ff777ddd000 rw-p 0001b000 08:01 1907 
/usr/lib/x86_64-linux-gnu/libgstvideo-0.10.so.0.25.0
7ff777ddd000-7ff777dfe000 r-xp 00000000 08:01 1902 
/usr/lib/x86_64-linux-gnu/libgstpbutils-0.10.so.0.25.0
7ff777dfe000-7ff777ffd000 ---p 00021000 08:01 1902 
/usr/lib/x86_64-linux-gnu/libgstpbutils-0.10.so.0.25.0
7ff777ffd000-7ff777fff000 r--p 00020000 08:01 1902 
/usr/lib/x86_64-linux-gnu/libgstpbutils-0.10.so.0.25.0
7ff777fff000-7ff778000000 rw-p 00022000 08:01 1902 
/usr/lib/x86_64-linux-gnu/libgstpbutils-0.10.so.0.25.0
7ff778000000-7ff778022000 rw-p 00000000 00:00 0
7ff778022000-7ff77c000000 ---p 00000000 00:00 0
7ff77c03b000-7ff77c07c000 rw-p 00000000 00:00 0
7ff77c07c000-7ff77c08c000 r-xp 00000000 08:01 1899 
/usr/lib/x86_64-linux-gnu/libgstinterfaces-0.10.so.0.25.0
7ff77c08c000-7ff77c28c000 ---p 00010000 08:01 1899 
/usr/lib/x86_64-linux-gnu/libgstinterfaces-0.10.so.0.25.0
7ff77c28c000-7ff77c28d000 r--p 00010000 08:01 1899 
/usr/lib/x86_64-linux-gnu/libgstinterfaces-0.10.so.0.25.0
7ff77c28d000-7ff77c28e000 rw-p 00011000 08:01 1899 
/usr/lib/x86_64-linux-gnu/libgstinterfaces-0.10.so.0.25.0
7ff77c28e000-7ff77c2e0000 r-xp 00000000 08:01 10760 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0
7ff77c2e0000-7ff77c4df000 ---p 00052000 08:01 10760 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0
7ff77c4df000-7ff77c4e0000 r--p 00051000 08:01 10760 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0
7ff77c4e0000-7ff77c4e1000 rw-p 00052000 08:01 10760 
/usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0.30.0
7ff77c4e1000-7ff77c4ec000 r-xp 00000000 08:01 1905 
/usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0.25.0
7ff77c4ec000-7ff77c6eb000 ---p 0000b000 08:01 1905 
/usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0.25.0Abandon (core dumped)


-- 
Vincent V.V.
Oqapy <https://launchpad.net/oqapy> . Qarte 
<https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>


More information about the PyQt mailing list