PDA

View Full Version : QGLWidget and wheel event



shenakan
6th November 2009, 10:43
I have a window that contains two QGLWidget. I can use mouse button event, mouse position and key event to move my 3D objects but It is like the whee event doesn't work. I add setFocusPolicy(Qt::StrongFocus); for both of my QGLWidget but It still the same...
I miss something ? Event if I click before on the widget.


void Widget::mouseWheelEvent(QWheelEvent *event){
screen2DGL->setZoom(event->delta());
repaint();
}

fanat9
6th November 2009, 16:21
It's wheelEvent, not mouseWheelEvent.

http://doc.trolltech.com/4.5/qwidget.html#wheelEvent