To be effective, processEvents() should be called from within the blocking function; in this case doNetworkCheck().
If there is to much delay in doNetworkCheck(), then maybe you should consider running it in its own thread.