Hi,
I am using OSG 3.0.0 with Qt 4.7 under Windows 7 with Visual Studio 2010.
I have a viewer where the mouse-wheel button is used quite often. When tilting
the mouse wheel slightly (left/right), it happens that a scroll event is
emitted (not left/right but up/down). So I was looking to discern between mouse
wheel scroll up/down and left/right.
I changed the GLWidget::wheelEvent to this:
Code:
void GLWidget::wheelEvent( QWheelEvent* event )
{
setKeyboardModifiers( event );
_gw->getEventQueue()->mouseScroll(
event->orientation() == Qt::Vertical ?
(event->delta()>0 ? osgGA::GUIEventAdapter::SCROLL_UP :
osgGA::GUIEventAdapter::SCROLL_DOWN) :
(event->delta()>0 ? osgGA::GUIEventAdapter::SCROLL_LEFT :
osgGA::GUIEventAdapter::SCROLL_RIGHT) );
}
and it seems to work. I was wondering if there might be a Qt version previous
to Qt 4.7 where this won't work, because Qt docs don't mention a version when
this function was added.
Would this be a good addition for OSG?
Thank you!
Cheers,
Claus[/code]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41447#41447
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org