diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp index cc1f52a92c..10d9d346a6 100644 --- a/examples/opengl/hellowindow/hellowindow.cpp +++ b/examples/opengl/hellowindow/hellowindow.cpp @@ -10,7 +10,7 @@ Renderer::Renderer(const QSurfaceFormat &format, Renderer *share) : m_initialized(false) , m_format(format) { - m_context = new QOpenGLContext; + m_context = new QOpenGLContext(this); m_context->setFormat(format); if (share) m_context->setShareContext(share->m_context);