How do you write a console application?

With GUI application I usually write a main.cpp with the code

QApplication app(argc, argv);
SimpleGUI *ai = new SimpleGUI;
ai->show();
return app.exec();

and then I only have to concentrate on the SimpleGUI class. But what do I do with a console application?

Is it just me, or shouldn't there be more short simple examples in the Qt documentation?