If you don't need an event loop then just don't call QCoreApplication::exec().