Ok, I got it. As mchara said, I choose to add qApp->quit(); as the last line of colseEvent() to close the application.

thanks