PDA

View Full Version : GUI doesn't update in QThreaded opengl application



bingofuel
6th November 2011, 15:13
I'm having a (what i think it's) strange behaviour using QThread. I'm testing in GNU/Linux with a 3.x kernel

When I use a render thread to realize the opengl operations that should be drawn in the QGLWidget, if i run it in my Phenom II X4 it works fine. But if I run in a Intel(R) Atom(TM) CPU N550 1.50GHz the GUI is only refreshed when an event it's triggered, (if I move the mouse or press the keyboard) I've tried using a Signal/Event across threads to notify the main thread to update itself but it doesn't work. I've called the update method of the QGLWidget inside the render thread but it doesn't work either.

I can reproduce it with this example http://mih.voxindeserto.de/threadedcube.html If I add this invocation


setRotation(rand()%120,rand()%120,rand()%150);

inside the run method of the render thread of the ExampleRenderThread.

The tho machines have the same OS, Archlinux x86_64 with 3.0.7 Kernel

I don't know if is a hardware related or some QThread setting that I'm missing or event filtering. What may be happening?

sanchrp
9th November 2012, 09:04
Hi there, did you ever find a solution to your problem? I'm experiencing the same type of problem under Xubuntu 10.42. I have some blinking labels which blink just fine on most machines but on my target platform (a customized panel pc) the blinking becomes completely random... unless I move the mouse continually.