Function processEvents
Process all pending events without blocking.
bool processEvents();
Checks if events are ready to trigger immediately, and run their callbacks if so.
Returns
Returns false iff exitEventLoop was called in the process.