From a7d682dd9c9271d137d5aa73a9192a812492a596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 31 Aug 2011 09:14:00 +0200 Subject: Fixed hellowindow making context current in wrong thread. Make the context a child of the Renderer, which is already moved to the correct thread. Change-Id: Iafda090e15b322c03e2c10b1905050f636b90197 Reviewed-on: http://codereview.qt.nokia.com/3915 Reviewed-by: Qt Sanity Bot Reviewed-by: Gunnar Sletta --- examples/opengl/hellowindow/hellowindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/opengl/hellowindow') 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); -- cgit v1.2.3