Hey, I'm using QT with opengl to make a chart in order to use it in different simulated physical experiments, but I'm facing the following problem. I can't see my chart line unless I minimized my form window and then maximized it, and I should do that all the time as long as my line chart is being drawn in order to get the full result!! What can I do, this is urgent and I need this chart working properly without minimizing and maximizing.??
+3
A:
It looks like you aren't doing a repaint until minimize/maximize. I suggest using a timer to get the job done. Posting your code will help!!
batbrat
2010-02-16 18:08:57
you mean calling "updateGL()"?, sorry I can't post the code, it's like a huge project.
Shaza
2010-02-16 18:20:21
Create a test-case and post that :)
batbrat
2010-02-16 18:23:19
Are you using QGLWidget, inheriting from something, or using an embedded context? Basically, what type of widget is doing the rendering and display?
Adam W
2010-02-16 19:07:06
Yep, I'm inheriting from QGLWidget.
Shaza
2010-02-16 19:17:23
+1
A:
That's right batbrat, the missing call is updateGL, I used the following timer and it all worked, thanks.
QTimer *timer = new QTimer( this );
connect( timer, SIGNAL(timeout()), this, SLOT(updateGL()));
timer->start(6);
Shaza
2010-02-16 19:23:21