Qt 5: Error : cannot make OpenGL Context current in a different thread
-
Hi
(Sorry for my poor English Speaking)
I use Ubuntu.
First, I run "this code":http://mih.voxindeserto.de/_static/threaded_cube-gcc4-qt4.tar.gz in qt4 and it was ok!
Now, when (after modify it's Include Classes for Qt5) I run it under Qt 5, there's this runtime Error: cannot make OpenGL Context current in a different thread
I thinks the problem is around the makeCurrent() function and "this link":http://qt-project.org/doc/qt-5.0/qtopengl/qglcontext.html says :"If you call this( makeCurrent() ) from a thread other than the main UI thread, make sure you've first pushed the context to the relevant thread from the UI thread using moveToThread()."
The Problem is that I don't know where i should put the "moveToThread()" function (in general or in this example).
Help me plz :-(