多看看Manual,(答案都太明确了):
void QCoreApplication::exit(int returnCode = 0)
After this function has been called, the application leaves the main event loop and returns from the call to exec(). The exec() function returns returnCode. If the event loop is not running, this function does nothing.