[PyQt] Old style signal/slot bug on win32

Giuseppe Corbelli giuseppe.corbelli at copanitalia.com
Thu May 23 09:27:28 BST 2013


Hi all
I've found a strange bug on win32 using PyQt old style signals.
Sometimes I get a wrong result from QObject::receivers and the signal is 
"lost". Looks like a PyQt bug cause a similar C++ example works correctly both 
on Linux and Win32.
Sidenotes:
* changing the signature for every new CRS instance seems to workaround the bug
* not deleting (keeping a reference) every new CRS instance seems to 
workaround the bug
* new style signals seem to work OK

Tested on:
Python 2.7.3 (default, Mar  5 2013, 01:19:40) [GCC 4.7.2] on linux2
PYQT_VERSION_STR='snapshot-4.10.2-d9c6e01fe9ce'
QtCore.QT_VERSION_STR='4.8.2'
Linux 3.3.5 #1 SMP/32bit

Python 2.7.3 (default, Dec 18 2012, 17:53:47) [MSC v.1500 32 bit (Intel)]
PYQT_VERSION_STR='4.9.6'
QT_VERSION_STR='4.8.4'
Windows 7/32bit and XP/32bit

As programs output I expect matching emit/receive logs and 1 single receiver.
Attached python and c++ examples.
Python program uses an "nexplode.txt" logfile in append mode, while C++ uses 
qDebug()

-- 
             Giuseppe Corbelli
WASP Software Engineer, Copan Italia S.p.A
Phone: +390303666318  Fax: +390302659932
E-mail: giuseppe.corbelli at copanitalia.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: explode5.py
Type: text/x-python
Size: 5729 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130523/b6bac2fb/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 1307 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130523/b6bac2fb/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.h
Type: text/x-chdr
Size: 583 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130523/b6bac2fb/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testsignal.pro
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130523/b6bac2fb/attachment.ksh>


More information about the PyQt mailing list