QT C++, running .exe file through command prompt (or PowerShell)

I was recently working on my university project and I have problems. I want to run command-prompt commands from c++ program and get the results. I found a way to run multiple commands in this way

system(cmd1 && cmd2 && ...)

But after this call command prompt 'closes', all I want is to run commands dynamically coming from user.