[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] python threads and qt
From:       Phil Thompson <phil () river-bank ! demon ! co ! uk>
Date:       2003-01-25 13:34:40
[Download RAW message or body]

On Thursday 23 January 2003 2:17 am, ranto wrote:
> I have been looking for information on using python threads and qt
> widgets. The main question i couldnt get to solve is: can i emit a
> signal from a thread that is going to be received in another? for
> example, the main part of my program code handles socket connections
> and comunication in general, while another part of the program must
> reflect in qwidgets the network state, messages received, etc, so i
> need to comunicate in some ways these two threads. I wonder if anyone
> can point me in the right direction. I am new to threads in general,
> so i might be designing my program in the wrong way. Any comments
> would be welcome.

I would recommend the method used by the semaphore.py example included with 
PyQt. Use Qt threads rather than Python threads and use custom events for 
communicating between different threads.

Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic