I agree, this while() was bothering me.
I'm using a _timer with QTimer where start() by clicking, I get the Socket data with onReadyRead() process met _timer.stop() but emito sign for the status, seems to be working well.
But I accept suggestions for improvement, but I removed the loop while()