widget is neither updation nor listening to events
Hello,
I have a hopefully easy problem (at least I think so)...
I have class called "glwidget" which is derived from QGLwidget. This class has a funktion called "plot()" which is able to draw a plot of a given set of data onto the glwidget.
Glwidget also implements the mouseMoveEvent as well as the mousePressEvent.
The glwidget is embedded into a main_window.
Now to my problem: The function plot() gets called from within a for-loop in a function of the main_window. The two following problems occur:
1) the plotted data is only shown at the very end of the for-loop, thus it is not updated at every step even though updateGL() is called.
2) while the for-loop is running the glwidget does not seem to listen to the mouse events but this problem could be related to problem (1) since I am not seeing any update while the for-loop is still running.
I hope that I was able to express my problem...
Do you have any suggestions?
Cheers,
Harnz
EDIT: I've just added an output to the mousePressEvent and it seems that the function will not be called until the for-loop has exited. Therefore the for-loop seems to have priority and does not allow other functions to be called.
This post has been edited 1 times, last edit by "harnz" (Nov 6th 2010, 11:57pm)