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?

Qt Code:
  1. #include <QtCore/QCoreApplication>
  2. #include <sasaja.h>
  3. #include <stdio.h>
  4. #include <iostream>
  5. #include <QString>
  6. #include <string.h>
  7.  
  8. int main(int argc, char *argv[])
  9. {
  10. QCoreApplication a(argc, argv);
  11. std::cout << "world" << "ziauru";
  12. std::cout << "hello";
  13. std::cout << std::flush;
  14. Sasaja sasaja;
  15. return a.exec();
  16. }
To copy to clipboard, switch view to plain text mode 

Thanks.