Hide TCanvas while running ROOT

Searched without finding something in class documentation or this forum.

Is there a way to hide a TCanvas, while running root?
Something like myCanvas->Hide() and then myCanvas->Show().

Context: I have a Qt application which plots some data on a TCanvas.
In the Linux version, I use the Widget example, and this works, because I can just hide the window.
But on the Mac version, I cannot use the widget, so I have to make it “raw” using simple TCanvas, for which I didn’t find yet a way to hide it.

thank you!

To hide (unmap) the canvas:

((TRootCanvas*)canvas->GetCanvasImp())->UnmapWindow();

And to show (map) it:

((TRootCanvas*)canvas->GetCanvasImp())->MapRaised();

Cheers, Bertrand.

1 Like

Perfect!
Works nicely on the Mac application.
Thank you once again Bertrand!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.