Hmm, if you create the window in C++ you could try to override the closeEvent() method.
In there you first call the base class implementation and then emit a signal that notifies QML that closeEvent() has been processed.

Cheers,
_