RE: [ROOT] TRootBrowser

From: Valeri Fine (
Date: Sun Feb 08 2004 - 20:12:26 MET

With Qt-layer your goal is simple to achieve because any Qt widget emits
the "destroyed" SIGNAL   (see ) It doesn't matter
what was the reason for that QWidget collapse. It can be due the code
calling "delete" or because of the user acted to "destroy" the window on
the screen.
This means in your main() you can connect the "destroyed" signal with
some custom slot that in turn does gApplication->Terminate();

For example the "qtgui" package from does provide
several implementations for TBrowserImp class for different occasions.

Calling "gApplication->Terminate();"  from object dtor may have caused
the unforeseen troubles  and surprise the end-user.

On other hand the Qt-like solution can be done with TRootBrowser also. 
One should re-call that TGFrame base class object emits:


ROOT signal just the user had closed the appropriated X window.

ntMessage )

You should connect this signal with your code to terminate the
application. In this case no custom TBrowser class is required.

  Hope this helps.

> -----Original Message-----
> From:
> On Behalf Of Alexander Bürger
> Sent: Sunday, February 08, 2004 9:23 AM
> To:
> Subject: Re: [ROOT] TRootBrowser
> Hi Rene,
> > To exit from the application, select the "Quit Root" item in the
> > browser "File" menu.
> This is the point. I find it much more convenient if the application
> exits also when I close the window via the windowmanager because I
> I would often forget to "Quit ROOT". The aim is to put it into
> so I cannot just stop the application with Ctrl-C when it's run e.g.
> from mozilla.
> Best wishes,
> Alexander

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET