[PyQt] QRunnable and signals/slots

Giuseppe Corbelli corbelligiuseppe at mesdan.it
Thu Jul 5 14:44:28 BST 2018


Hi all
I would like to have a generic QRunnable that just references a packaged 
task and executes it, without having to subclass everytime and not 
considering synchronization issues, but with signals/slots integration.

I found a few references [1] that suggest the straightforward approach 
to subclass both QObject and QRunnable (in this order).

The implementation attached looks fine&simple enough to me but somehow 
the events are not running, and I cannot see what is wrong. PyQt/Qt 
5.10.1 on Debian x86_64, Python 3.6.6

Hope someone wants to have a look, thanks in advance.


[1] https://gist.github.com/paulbarbu/6086849

-- 
Giuseppe Corbelli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Runnable.py
Type: text/x-python
Size: 1743 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180705/93f0f4da/attachment.py>


More information about the PyQt mailing list