May be this is a QT question,
I am trying to convert my Glut program to a QT widget (using QGLWidget)
I replaced all glut functions with corresponding QT functions except one - glutIdleFunc(…). Does nebbody know, how to replace this function when using QT instead of GLUT for an openGL application.
This is obviously a QT question.
In QT, you don’t have any idle func but you can emulate this using a QTimer.
The code looks like this :
QTimer* timer = new QTimer(mywindow);
timer.start(0,false);
connect(&timer,SIGNAL(timeout()),mywindow,SLOT(idle));
The idea is to launch a timer with 0 timeout. The slot will be called when the widget has no user event to process.
Hmm…I thought there was a Qt message board on trolltech.com but I just visited and did not see one. I think they need a message board on trolltech, it would help a lot.