diff --git a/lib/QGLSurface.cc b/lib/QGLSurface.cc index 7abdcd3..3c588ec 100644 --- a/lib/QGLSurface.cc +++ b/lib/QGLSurface.cc @@ -40,6 +40,19 @@ QGLSurface::QGLSurface(QWidget *parent, qt_sink_c_impl *block) this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); } + +void +QGLSurface::hideEvent(QHideEvent *he) +{ + this->d_block->cb_visibility(this->isVisible()); +} + +void +QGLSurface::showEvent(QShowEvent *he) +{ + this->d_block->cb_visibility(this->isVisible()); +} + void QGLSurface::paintEvent(QPaintEvent *pe) { diff --git a/lib/QGLSurface.h b/lib/QGLSurface.h index 65afd8a..a10b2a1 100644 --- a/lib/QGLSurface.h +++ b/lib/QGLSurface.h @@ -38,6 +38,8 @@ namespace gr { QThread *d_gui_thread; protected: + void hideEvent(QHideEvent *he); + void showEvent(QShowEvent *he); void paintEvent(QPaintEvent *pe); void resizeEvent(QResizeEvent *re); void keyPressEvent(QKeyEvent *ke);