[PyQt] Old style signal/slot bug on win32

Phil Thompson phil at riverbankcomputing.com
Fri May 24 18:02:05 BST 2013


On Thu, 23 May 2013 10:27:28 +0200, Giuseppe Corbelli
<giuseppe.corbelli at copanitalia.com> wrote:
> 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()

They work the same as far as I can tell - though it's difficult to see as
the outputs are different.

The programs themselves are too different to be a sensible comparison.

Phil


More information about the PyQt mailing list