You will have to use QProcess to run diff or any other tool.
Also, with QProcess, you can read the stdout of the process in a buffer.

You will still have to create a parser for that output.

Also, you are not necessarily obligated to use diff. A much easier way would be to "look" at the sources of WinMerge(www.winmerge.org), or any other open source diff tool, even"diff".

Regards