You might be able to run the external program in a QProcess and redirect its stdout into stdin of your Qt program. See QProcess::setProcessChannelMode()
Here's some code from a stackoverflow accepted answer to a similar question:
Qt Code:
QProcess p; p.start( /* whatever your command is, see the doc for param types */ ); p.waitForFinished(-1); To copy to clipboard, switch view to plain text mode
This, however, blocks your Qt app while the external process is running. You could also connect slots to QProcess signals (finished(), readyReadStandardOutput) and not use waitForFinished. See this other stackoverflow answer.
Bookmarks