June 3, 2011

phamtv phamtv
Lab Rat
85 posts

QProcess - spawning another process within a process

 

I can successfully spawn the Cygwin’s bash process from my Qt application. However, I want cygwin’s bash to start another process (dejagnu) within itself. How can I achieve this?

1 reply

June 4, 2011

Volker Volker
Ant Farmer
5331 posts

That’s more a subject to bash, not to Qt.

You can call bash with -c <command> parameter like this:

  1. QString command = "bash";
  2. args << "-c" << "dejagnu";
  3. QProcess p(this);
  4. p.start(command, args);

 
  ‹‹ Custom Event Compression      [Solved] Qt Main Window resize problem (Linux/Ubuntu 11.04, Gnome) ››

You must log in to post a reply. Not a member yet? Register here!