Hi, > qApp->processEvents(QEventLoop::ExcludeUserInputEvents,5000); Your processEvents call timeouts after 5 secs, and you wait for 5 secs, at least sometimes. How about reducing it to 1 sec then, as you think it has nothing to do, anyway, and probably only waiting 1 sec (sometimes). Best, Michael.