I am trying to close an application
#include <QtGui/QApplication>
#include "battle.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
battle w;
int x = 14;
if(x == 1)
{
w.show();
}
else if(x!=1)
{
qApp->exit(0);
//Remove application from memory...
}
return a.exec();
}
but if i go to windows processes,it is still there.What is the best way to remove the application from memory?.
Don’t call a.exec() after you call qApp->exit(0).