for that simple project you don't need a QCoreApplication. Simply call and your program will exit. (alternatively you can call the quit slot of the applications object.)
As to the order to avoid possible problems in future, put the initialization of the core application at the beginning of the main function.
Bookmarks