[PyKDE] GUI not updateing ?

Andreas Pakulat apaku at gmx.de
Sun Sep 24 12:44:35 BST 2006


On 24.09.06 13:16:11, Detlev Offenbach wrote:
> On Sunday 24 September 2006 12:55, Dave S wrote:
> > My main window has a progress bar in it. When I click a button my script
> > starts a thread for a backend script that takes some time to run.
> >
> > The backend script passes data including its progress to my main script via
> > a FIFO, now I have a problem.
> >
> > The FIFO is providing progress data that is being written to the GUI with
> > self.progressBar1.setProgress(pc, 100) but nothing is being shown until my
> > script exits.
> >
> > So the GUI is not updated while I am in a while loop looking for FIFO data
> > ? If so how do you guys get around this ?
> 
> Try QApplication.processEvents() after the setProgress call.

Or use events to communicate the progress. I haven't had the experience
yet, but many qt and kde developers say that processEvents is evil and
should be avoided, it might have mysterious side effects.

Andreas

-- 
You may be gone tomorrow, but that doesn't mean that you weren't here today.




More information about the PyQt mailing list