gr-fosphor/qt: Qt5 - Track visibility of the widget
When not visible, doing GL operations is not supported Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
caa88f0a31
commit
fa6761afbf
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue