I want to write a little program with a CLI. How do I actually implement this?
The Tutorials/examples were not really about CLIs and searching didnt help me yet...

main.cpp:
Qt Code:
  1. #include <QCoreApplication>
  2. #include "myapp.h"
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QCoreApplication app(argc, argv);
  7. MyApp *realApp = new MyApp(argc,argv);
  8. return realApp->run();
  9. }
To copy to clipboard, switch view to plain text mode 
doesnt look good, because no eventloop is created...
should i instead let myapp inherit QCoreApplication and just reimplement myapp::exec() to do what i want it to?
Or what is the "right" way to do it?

Thank you very much for your help!