[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] Keeping the GUI from freezing
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2007-02-19 20:35:40
Message-ID: 20070219203540.GA879 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]
On 19.02.07 12:12:38, Tony Cappellini wrote:
> Message: 2
> Date: Mon, 19 Feb 2007 17:27:23 +0100
> From: Andreas Pakulat <apaku@gmx.de>
> Subject: Re: [PyKDE] Keeping the GUI from freezing
> To: pykde@mats.imk.fraunhofer.de
> Message-ID: <20070219162723.GC20122@morpheus.apaku.dnsalias.org>
> 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 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