summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellowindow/hellowindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/hellowindow/hellowindow.cpp')
-rw-r--r--examples/opengl/hellowindow/hellowindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp
index b1140c4f1d..998b29b540 100644
--- a/examples/opengl/hellowindow/hellowindow.cpp
+++ b/examples/opengl/hellowindow/hellowindow.cpp
@@ -92,7 +92,8 @@ void HelloWindow::mousePressEvent(QMouseEvent *)
void HelloWindow::render()
{
- emit needRender(this, m_color, size());
+ if (isExposed())
+ emit needRender(this, m_color, size());
}
void HelloWindow::updateColor()