soul_rebel
17th October 2007, 21:36
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:
#include <QCoreApplication>
#include "myapp.h"
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
MyApp *realApp = new MyApp(argc,argv);
return realApp->run();
} 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!
The Tutorials/examples were not really about CLIs and searching didnt help me yet...
main.cpp:
#include <QCoreApplication>
#include "myapp.h"
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
MyApp *realApp = new MyApp(argc,argv);
return realApp->run();
} 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!