Yes. QApplication::quitOnLastWindowClosed.