[Interest] how to block run function of QRunnable class

K. Frank kfrank29.c at gmail.com
Tue Mar 19 15:22:49 CET 2013


Hi André!

On Tue, Mar 19, 2013 at 10:11 AM, André Somers <andre at familiesomers.nl> wrote:
> Op 19-3-2013 14:57, K. Frank schreef:
>> Hello Tony!
>>
>> I have something of a side question, below.
>> ...
>> A cross-platform sleep (in a cross-platform framework, at that).  What's
>> not to like?
>>
>> But seriously, does anyone know what the motivation for making sleep
>> protected might have been?
>
> I'm not sure, probably to discourage its usage. Anyway, in Qt 5, there
> now are static public member functions sleep and usleep in QThread.

Thanks, good answer.   I haven't moved to Qt 5 yet, so thanks for noting
that sleep has become unprotected.

For the time being with Qt 4 I guess I'll just keep on unprotecting sleep,
à la Tony, and not feel guilty about it.

> André


Thanks.


K. Frank



More information about the Interest mailing list