[PyKDE] Threads in PyQT

Boudewijn Rempt bsarempt at xs4all.nl
Thu Jul 5 21:20:20 BST 2001


On Thu, 5 Jul 2001, Jason Petrone wrote:

> On Wed, Jul 04, 2001 at 07:16:06AM +0200, Boudewijn Rempt wrote:
> > Yes, it is reasonably safe to have the thread emit signals that are caught
> > by the main thread that runs the interface. 
> 
> Reasonably safe... sure.  But unless I put sleeps in everywhere, I still get
> deadlock.  It looks like QT doesn't like me throwing signals faster than it can
> handle them.  
> 
> Where's the QThread class?  I'm getting more and more convinced there is no
> good way to do threading with PyQT(or wxPython for that matter).
> 
> > You can also have the thread update a an accessible variable that is read out
> > periodically (use a QTimer) by the interface thread. 
> 
> This is probably what I will end up doing.  But its a pain since it will have
> a negative net effect on the UI's usability.
> 

I quite agree - this is one area where the current solutions are quite
sub-optimal. Qt threading is still quite fresh, though. Even knode doesn't
use Qt threads, just pthreads that run outside the GUI.





More information about the PyQt mailing list