Guest User

Untitled

a guest
Nov 22nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <QCoreApplication>
  2. #include <QtCore/QtCore>
  3. #include "monitor.h"
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. QCoreApplication a(argc, argv);
  8.  
  9. QProcess p;
  10. p.start("/bin/ls");
  11. qDebug() << "Let's Go";
  12. Monitor m;
  13.  
  14. QObject::connect(&p, SIGNAL(finished(int,QProcess::ExitStatus)), &m, SLOT(finished(int,QProcess::ExitStatus)));
  15. QObject::connect(&p, SIGNAL(readyReadStandardOutput()), &m, SLOT(readyReadStandardOutput()));
  16. QObject::connect(&p, SIGNAL(started()), &m, SLOT(started()));
  17.  
  18. return a.exec();
  19. }
Add Comment
Please, Sign In to add comment