[Qt-creator] Closing non-modal dialog

Eike Ziller eike.ziller at nokia.com
Tue Apr 20 12:28:51 CEST 2010


On Apr 19, 2010, at 8:19 PM, Kostadinov Goran (Nokia-D/Espoo) wrote:

> Hi,
>  
> A short question about proper way of shutdown-ing a plug-in.
>  
> In situation when, from QtCreator plugin named ScreenShotToolPlugin, non-modal dialog is opened, when QTCreator is closed, shutdown function from respective plugin is not called until the moment the non-modal dialog is explicitly closed. Is there any way for plugin to get notification about close event of QtCreator or some other way to close non-modal dialog created from plugin when QTCreator is closed?

I don't see why shutdown is not called even though the dialog is open?
Anyhow, there are two more ways to get informed / react on a "close the application" request:
- Core::ICoreListener
- signal Core::ICore::coreAboutToClose

Br, Eike

> class MainDlg;
>  
> class ScreenShotToolPlugin : public ExtensionSystem::IPlugin
> {
>     Q_OBJECT
>  
> public:
>     void shutdown();
>  
> private:
>     MainDlg * dlg;
>  
> private slots:
>     void openDialog()
>         {
>                dlg = new MainDlg();
>                dlg->show();
>         }
> };
>  
> Best Regards,
> Goran
> <ATT00001..txt>

-- 
Eike Ziller
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori







More information about the Qt-creator-old mailing list