Okay, I may be stupid, but I didn't manage to find anything that worked for me regarding this question. I want my Qt console application to exit after it has finished all the work, in this case after it's finished work it's still running and I need to force exit by clicking <Ctrl+C> (I'm on linux and running it from terminal). So here's the code, how do I supply it so that it exits?
#include <QtCore/QCoreApplication>
#include <sasaja.h>
#include <stdio.h>
#include <iostream>
#include <QString>
#include <string.h>
int main(int argc, char *argv[])
{
std::cout << "world" << "ziauru";
std::cout << "hello";
std::cout << std::flush;
Sasaja sasaja;
return a.exec();
}
#include <QtCore/QCoreApplication>
#include <sasaja.h>
#include <stdio.h>
#include <iostream>
#include <QString>
#include <string.h>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
std::cout << "world" << "ziauru";
std::cout << "hello";
std::cout << std::flush;
Sasaja sasaja;
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Thanks.
Bookmarks