How to get int value from QPoint angleDelta() ?
-
hi, I'm trying to use this
"http://qt-project.org/doc/qt-5.0/qtgui/qwheelevent.html#angleDelta":http://qt-project.org/doc/qt-5.0/qtgui/qwheelevent.html#angleDelta
to increment a value by using the scroll wheel. But I can't get the int value from the QPoint angleDelta()@ void GLWidget::zoomWheel( QWheelEvent *e )
{
QPoint scrollStep = e->angleDelta()/120; //I read it's given in multiples of 120
//int zoomStep = (int)scrollStep;
setxFrom(xfrom+zoomStep);
setyFrom(yfrom+zoomStep);
setzFrom(zfrom+zoomStep);
} @what's the best way to do this? Thanks