Hi again Morné,
- The trackball manipulator does not throw (since Robert does not see
this we can assume this is a Windows-specific problem, either caused by
Qt on Windows or GraphicsWindowWin32's event handling)
I've found out why this is. Since QOSGWidget uses GraphicsWindowWin32
directly, the graphics window already sends mouse events to the event
queue. So in QOSGWidget::mouse*Event (Press, DoubleClick, Release,
Move), you don't want to call _gw->getEventQueue()->mouseButton*()
because then it means that the same event is sent twice. This has the
effect that if two release events are received by the
TrackballManipulator, it stops the throw since the mouse speed when it
gets the second release is 0.
I would still send the events to QWidget though, just to be sure, so I
would replace those methods by:
void QOSGWidget::mousePressEvent( QMouseEvent* event )
{
QWidget::mousePressEvent(event);
}
(or just not override them) and so on for all other event methods. The
actual event will be put in the event queue in
GraphicsWindowWin32::handleNativeWindowingEvent().
In our project, we had run into the same problem, but we resolved it
differently. We subclassed GraphicsWindowWin32 to ignore all events, and
instead add them in the event queue in the overridden QOSGWidget
methods. I don't remember why we did it this way, but I think the above
is more general, in addition to not requiring a subclass.
I'm still looking for the cause/solution to the addView() problem.
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org