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

List:       pykde
Subject:    Re: [PyKDE] Updating PyQt widgets question
From:       Gordon Tyler <gordon () doxxx ! net>
Date:       2003-11-19 16:43:04
[Download RAW message or body]

Eric Williams wrote:

> I've re-written my app so that it uses a QTimer and timerEvent method to 
> update the widgets, and that the long-running routine (actually an FTP 
> download) runs in a thread; that works like I expected. I guess my question 
> is, is using a QTimer the 'correct' way to update widgets during an expensive 
> routine like the one above? And what sort of widgets can be reliably updated 
> from within a function?

QTimer is one way to go. You could also post custom events from your 
long-running thread to the GUI thread and have your widgets process 
those events to update their state.

Be sure to read this: http://doc.trolltech.com/3.2/threads.html, 
especially the part about Thread-safe Event Posting.

Ciao,
Gordon


_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.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