PDA

View Full Version : wheel event problem



bhogasena
28th January 2009, 13:13
hi,

i rendered the some picture by polygons in qglwidget.
i used belo functions

initializegl();
paintgl();
resizegl();

in side paintgl() just i cler buffers and call draw() function, in which i have algorithm for rendering

for zooming and panning i have written code inside

wheelevent()
mousemove event()

now problem is when i move the mouse or moving wheel instantly it is not updating the glwidget.

but when i resize window it is updating. the same thing is happening even for push buttons.in this case once after clicking the pushbuttons if click mouse on screen it is updating

can anyone help me in this regard so that i'll be thankful to you and i can move furher in my project

thanks and regards
bhogasena reddy

ToddAtWSU
30th January 2009, 19:11
You need to call updateGL( ) at the end of your wheelevent and mouseMoveEvent functions. You need to tell your QGLWidget when you want to update and the proper way to do this is by calling updateGL( ) which inherently calls paintGL( ).