[PyQt] QRunnable and emitting signals
Jeremy Sanders
jeremy at jeremysanders.net
Tue Jul 19 15:30:17 BST 2011
Hi - I'm having problems with the following code where a QRunnable emits
a signal then ends. If you click the button it should print 1,2,3. It
sometimes works for the first few times but the wrong number of
arguments is given to the slot after that.
I'm using 4.8.3 on Linux (x86).
Is this a PyQt bug? I assume one of the objects is getting reference
counted between the end of the runnable and signal it emits being
delivered, but I may be wrong.
I've tried setting autodelete on the runnable to be false but that
causes a crash. The code works if you emit and connect to an object
which isn't a member of the runnable class.
Is there an easy way to signal a result from a QRunnable? I've worked
around this problem by replacing the code with a worker thread and a
semaphore.
Jeremy
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.py
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110719/6d621016/attachment.ksh>
More information about the PyQt
mailing list