Hi,
#include <QtGui/QApplication>
#include <QProcess>
int main(int argc, char *argv[])
{
myProcess->start("notepad.exe");
//QObject::connect(myProcess,SIGNAL(destroyed()),myProcess,SLOT());
return a.exec();
}
#include <QtGui/QApplication>
#include <QProcess>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QProcess *myProcess = new QProcess;
myProcess->start("notepad.exe");
//QObject::connect(myProcess,SIGNAL(destroyed()),myProcess,SLOT());
return a.exec();
}
To copy to clipboard, switch view to plain text mode
here when the process->start is used the Notepad application is opening but when I close the notepad the app should also close, in QTCreator it still showing as running in the application output.
how to close the QApplication when the QProcess or the application opened using the qprocess is closed.
here I tried to use the signal and slot but how to close the main app ?
Bookmarks