it seems to me that the TCanvas::Closed() signal is not emitted when the user closes the canvas by clicking on the X button of the window. I receive any other signals (Selected, Destroyed, …) so it’s not an issue with my Connect implementation.
I have a class RootAppManager which derives from TApplication, and the dictionary is generated. I connect it to TCanvas using
And the CanvasClosed slot just display a message on screen. This slot never gets called. If I replace “Closed()” with any other signal, I get the CanvasClosed() message when performing the corresponding action.
Thanks for the answer.I am not sure I see the point of having a signal Closed AND a signal Destroyed then if Closed is emitted only when the canvas is destroyed.A signal for that specific action of closing the window holding the canvas should exist.
EDIT: I read more carefully the link and I am using ROOT 6.11. In the linked thread it is mentioned that this behaviour should have been fixed with in ROOT 6.10. Am I missing something?
to demonstrate what happens I add little macro,
Run it with:
MyCanvas *mc = new MyCanvas()
and close the window with the X of the window manager.
Before Root 6.10 CloseCanvas() was called at this moment.
Now you need to exploit the signal from the TRootCanvas (TGWindow)