Is it alternative of windowClosed event for openglwindow?
-
Hi,
I would think the x-button is part of a widget not of a (opengl)window. The usual way is to override the widget's closeEvent. But if you generate the widget from the (opengl)window you cannot do it directly. You can probably include the widget in the layout of another widget where you can then override the closeEvent.
-Michael. -
Hi,
To add to @m-sue, what do you need to do when your QOpenGLWindow closes ?
-
Then why not use the visible property for that ?
-
You could also create a SIGNAL and emit it that says your custom window has closed. If you are do not know the pointer to the QOpenGLWindow to connect to it, you could route through a parent class by creating the same signal, connecting the QOpenGLWindow to the parent signal, then connecting the obtaining slot to the parent window.
Seems like a round about way, but signals and slots are useful in many ways. It is like a router pattern for signals and slots.