diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp index 235775f09a..048190d766 100644 --- a/examples/opengl/hellowindow/hellowindow.cpp +++ b/examples/opengl/hellowindow/hellowindow.cpp @@ -93,6 +93,8 @@ HelloWindow::HelloWindow(const QSharedPointer &renderer, QScreen *scre void HelloWindow::exposeEvent(QExposeEvent *) { m_renderer->setAnimating(this, isExposed()); + if (isExposed()) + m_renderer->render(); } void HelloWindow::mousePressEvent(QMouseEvent *) diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h index 1372152e93..e92e45a125 100644 --- a/examples/opengl/hellowindow/hellowindow.h +++ b/examples/opengl/hellowindow/hellowindow.h @@ -70,7 +70,7 @@ public: void setAnimating(HelloWindow *window, bool animating); -private slots: +public slots: void render(); private: