The `done` event does not emit a `closeEvent`, but saving is only implemented in that event handler. Changing this to `close` correctly triggers the default QWidget event and thus settings are saved.