As per the main.cpp which you have sent you have made a class Test and and in the constructor you have gone for making a process with the connection of signal and slots.When an Object t of class test is made the process is initiated and the signal is eminated to be taken in by slot read().To remind you your code is down below:-
Qt Code:
  1. #include <QApplication>
  2. #include <QProcess>
  3. #include <QStringList>
  4. #include <QMessageBox>
  5. #include <QtDebug>
  6. class Test : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. Test()
  11. {
  12. _proc = new QProcess( this );
  13. _proc->setReadChannelMode( QProcess::MergedChannels );
  14. connect( _proc, SIGNAL( readyReadStandardOutput() ), this, SLOT( read() ) );
  15. connect( _proc, SIGNAL( finished(int, QProcess::ExitStatus) ), QCoreApplication::instance(), SLOT( quit() ) );
  16. _proc->start( "cjpeg", QStringList() << "aaa" << "bbb" );
  17. }
  18.  
  19. private slots:
  20. void read()
  21. {
  22. QMessageBox::information( 0, "test", _proc->readAllStandardOutput() );
  23. }
  24. private:
  25. QProcess *_proc;
  26. };
  27. int main( int argc, char **argv )
  28. {
  29. QApplication app( argc, argv );
  30. Test t;
  31. return app.exec();
  32. }
  33. #include "main.moc"
To copy to clipboard, switch view to plain text mode 

In my existing code I tried the similar thing.First of all I have class steg declared in steg.h but it is public QDialog whereas you have gone for public QObject.Do I have to stick to Public Qobject only.

Qt Code:
  1. #ifndef STEG_H
  2. #define STEG_H
  3. #include "ui_stegform1.h"
  4. #include <QProcess>
  5. #include <QMessageBox>
  6. class steg : public QDialog
  7. {
  8. Q_OBJECT
  9. public:
  10. steg(QWidget *parent = 0);
  11. QProcess *_proc;
  12. steg(QStringList s2)
  13. {
  14. _proc = new QProcess( this );
  15. _proc->setReadChannelMode( QProcess::MergedChannels );
  16.  
  17. connect( _proc, SIGNAL( readyReadStandardOutput() ), this, SLOT( read()));
  18. // connect( _proc, SIGNAL( finished(int, QProcess::ExitStatus) ), QCoreApplication::instance(), SLOT( quit() ) );
  19. _proc->start(("cjpeg"),s2);
  20. }
  21. private slots:
  22. void stego();
  23. void read()
  24. {
  25. QMessageBox::information( 0, "stego", _proc->readAllStandardOutput());
  26. }
  27. private:
  28. Ui::steg ui;
  29.  
  30. };
  31. #endif
To copy to clipboard, switch view to plain text mode 
Thereafter I overloaded the constructor by passing the Qstringlist s2 ( basically to pass arguments to cjpeg). Thereafter in the function stego() written in steg.cpp I
initiated the object steg t(s2)and called for the function t.read().

Qt Code:
  1. void steg::stego() /*** THIS MODULE HIDES CODED.TXT ***/
  2. {
  3. if(QFile::exists("coded.txt"))
  4. {
  5. s2 << "-steg" << "coded.txt" << "-q" << ui.compressionspinBox->text() << "cleanimage.ppm" << ui.jpeglineEdit ->text() ;
  6. steg t (s2);
  7. }
To copy to clipboard, switch view to plain text mode 

I do get the Qmessage box but no message is there
It is blank .You also notice that I pass the signal form "stego" to slot read. Is it OK.

Where is the problem.