You have already been told what tools you need to use to do this:
Linking textedit to the compiler

Here it is again: QProcess specifically QProcess::readyReadStandardOutput()
I have been posting various queries but didn't get a fruitful reply.
... and you intend to continue until someone provides a cut and paste solution.