[PyKDE] GUI not updateing ?

Detlev Offenbach detlev at die-offenbachs.de
Sun Sep 24 13:38:13 BST 2006


On Sunday 24 September 2006 13:44, Andreas Pakulat wrote:
> 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.

Which ones?

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de




More information about the PyQt mailing list