On 19.02.07 12:12:38, Tony Cappellini wrote: > Message: 2 > Date: Mon, 19 Feb 2007 17:27:23 +0100 > From: Andreas Pakulat <[EMAIL PROTECTED]> > Subject: Re: [PyKDE] Keeping the GUI from freezing > To: [email protected] > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=us-ascii > > >>The "safest" way to do heavy work, without blocking the Ui is a separate > >>thread. And unless you have to access main-thread-data from the > >>worker-thread (or vice versa) this is a relative no-brainer using only > >>events that are sent to the main thread. > > The script my gui is calling has a fairly intensive while loop which runs > for approx 20 seconds, depending on how many files it is processing. > > With this in mind, will I still be able to refresh the GUI and keep it > >from hanging > if I use your suggestion about threads?
If you run an external script using QProcess and listening for the finished signal is easier than using a separate thread. Apart from that: If you use worker-threads and don't actively wait for them to finish your gui will automatically update because the Qt event loop will keep running Andreas -- You are a very redundant person, that's what kind of person you are. _______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
