With QGIS 2.18, I used to capture the composer closure with PyQGIS, the class QgsComposerView and its composerViewHide signal:
Now, there is the QGIS 3 answer:
AttributeError: 'composerClass' object has no attribute 'composerView'
I guess this is because "composer related methods have been removed from the public API and Python bindings. These classes have been replaced with the new layouts engine, based on
QgsLayoutItem, and the other related classes."
But I can't find a signal in
QgsLayout class or a parent to capture the composer closure. If someone has any clues...