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

List:       kde-core-devel
Subject:    Re: Detecting a keypress during some heavy operation
From:       Rob Kaper <cap () capsi ! com>
Date:       2004-02-07 4:05:51
Message-ID: 20040207050551.P1419 () capsi ! com
[Download RAW message or body]


On Sat, Feb 07, 2004 at 02:25:56AM +0100, Marc Mutz wrote:
> 2. If the operation can be divided into chunks (say, ten iterations of 
> the for loop each), then you can put the operation into a slot, call 
> that slot to perform the first chunk and make the slot call itself for 
> the next chunk via the event loop by adding a
>   QTimer::singleShot( 0, this, SLOT(mySlot()) )
> just before returning from the slot.

That's a basic and recommended example from the 'KDE 2.0 Development' book
even.

Rob
-- 
Rob Kaper     | 2/17 Blink-182, 2/29 Anti-Flag
cap@capsi.com | 3/5  Anti-Flag/Heideroosjes, 3/19 The Offspring
www.capsi.com | 3/24 Good Riddance/None More Black, 5/14 Disney

[Attachment #3 (application/pgp-signature)]

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

Configure | About | News | Add a list | Sponsored by KoreLogic