и делаем event->accept();, иначе не сохраняем и делаем event->ignore();.
Программа в итоге закроется в обоих случаях? Чем акцепт от игнора тогда отличается?
When the user attempts to close the window, we call the private function maybeSave() to give the user the possibility to save pending changes. The function returns true if the user wants the application to close; otherwise, it returns false. In the first case, we save the user's preferences to disk and accept the close event; in the second case, we ignore the close event, meaning that the application will stay up and running as if nothing happened.
Обсуждают сегодня