<div dir="ltr">Thank you very much. That is perfect. When we move to a new version I can use it. <div>Now the Police of the Czech Republic is on 3.12 version. </div><div>I use the way that you have posted, so the QGIS can not be closed by the cross button, but may be closed by Ctrl+Q.</div><div>We will migrate after the pilot phase  that should end in April 2021.<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Jan Růžička, Ph.D.</span><br style="font-size:12.8px"><span style="font-size:12.8px">freelancer, </span><span style="font-size:12.8px">researcher and </span><span style="font-size:12.8px">volontaire</span></div><div>Geoinformatics<div>tel: +420 775 032 091<br></div><div><span style="font-size:12.8px">e-mail: <a href="http://jan.ruzicka.vsb.cz/" style="color:rgb(17,85,204)" target="_blank">jan.ruzicka.vsb@gmail.com</a></span><br></div></div><div><a href="http://github.com/ruz76/" target="_blank">http://github.com/ruz76/</a></div><div><a href="http://gismentors.eu/" target="_blank">http://gismentors.eu/</a></div><div><a href="http://dolnilhota.info/" target="_blank">http://dolnilhota.info/</a></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 6 oct. 2020 à 03:44, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 25 Jun 2020 at 21:30, Jan Růžička <<a href="mailto:jan.ruzicka.vsb@gmail.com" target="_blank">jan.ruzicka.vsb@gmail.com</a>> wrote:<br>
><br>
> Dear developers,<br>
><br>
> I have developed a plugin for the Police of the Czech Republic for Search and Rescue operations. It works quite well, but one important feature is missing.<br>
><br>
> After the search event is finished the user should enter the result of the search.<br>
><br>
> I was not able to find a way to catch an event when the user closes the whole QGIS. I need similar functionality like when closing in the case of a dirty project (no all changes were saved).<br>
><br>
> I have searched a lot and did not find any solution. I was able to catch the unload event of the plugin, but I did not find a way to keep QGIS opened.<br>
<br>
I know this is an old thread, but FYI QGIS 3.16 brings new API hooks<br>
to address this requirement.<br>
<br>
See <a href="https://github.com/qgis/QGIS/pull/39191" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/pull/39191</a><br>
<br>
Nyall<br>
</blockquote></div>