Use QProcess to execute your commands. If you need the terminal to be shown, see how KDE does it - they have terminal integrated into file manager (Dolphin), for example. And the same term component is used in Konsole and Yakuake, as far as I can tell.

a exe should run forever untill we kill the execution and killing process should done through by passing the command from GUI to terminal only.

Reimplement closeEvent() handling and prevent your app from being closed in a "normal" way. You can also set the window up without borders (see QWindow flags), then it will also be harder to close it by clicking on X button.