I am running an external process ( dos exe file runnable on command prompt) through Q process
I need to capture the error messages and either display them in the text browser ( which is static in my form) or make custom made message (depending on what the exe program has given ) and then display them in the textbrowser/popUP

Earlier I was able to do so in qt3.3.4 on linux with the following code

Qt Code:
  1. system ( "/root/stego/encrypt.sh >& /root/stego/error.txt" );
  2. textBrowser->clear();
  3. textBrowser->setSource( "/root/stego/error.txt") ;
To copy to clipboard, switch view to plain text mode 

where I was running the command prompt command through a script file ( encrypt.sh in above case) and redirecting the screen output to error .txt and then redirecting it to text browser.

Now in qt 4 ( windows) I am using the Qprocess as under

Qt Code:
  1. void steg::encrypt()
  2. {
  3. char encrypt_comand[]= "-e";
  4. char key_comand[]= "-k=";
  5. s3 << encrypt_comand << ui.datalineEdit->text() << "coded.txt" << ( key_comand + ui.passphraselineEdit->text() );
  6. QProcess::startDetached( QString("burp.exe"),s3 );
  7.  
  8. }
To copy to clipboard, switch view to plain text mode 
The burp.exe is command prompt command and gives the ok/error messages on the screen ( on console). How to direct the same to a text file.Then compare and show a custom message say in a text browser or I can even resort to pop message( why not?/let me improve with qt 4)

Thanks in advance for the guidance.