Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QCoreApplication>
- #include <QtCore/QtCore>
- #include "monitor.h"
- int main(int argc, char *argv[])
- {
- QCoreApplication a(argc, argv);
- QProcess p;
- p.start("/bin/ls");
- qDebug() << "Let's Go";
- Monitor m;
- QObject::connect(&p, SIGNAL(finished(int,QProcess::ExitStatus)), &m, SLOT(finished(int,QProcess::ExitStatus)));
- QObject::connect(&p, SIGNAL(readyReadStandardOutput()), &m, SLOT(readyReadStandardOutput()));
- QObject::connect(&p, SIGNAL(started()), &m, SLOT(started()));
- return a.exec();
- }
Add Comment
Please, Sign In to add comment