Hi All,
I have a simple Qt4 wrapper for my OSG 3.0 application which employs the
trackball manipulator. The left and middle mouse button functions in the
manipulator work as expected, but the right mouse button does not seem to do
anything, which makes the manipulator kind of useless.
Is this a known issue or could there be some problem with the way that I'm
implementing my viewer?
My widget class (which inherits osg::CompositeViewer) adds a view with the
trackball manipulator like so:
Code:
QWidget * MyViewerWidget::addToViewWidget(osg::Camera* cam, osg::Group* root)
{
osgViewer::View* view = new osgViewer::View;
view->setCamera(cam);
addView(view);
view->setSceneData(root);
view->setCameraManipulator(new osgGA::TrackballManipulator);
osgQt::GraphicsWindowQt* gw =
dynamic_cast<osgQt::GraphicsWindowQt*>(cam->getGraphicsContext());
return gw ? gw->getGLWidget() : NULL;
}
And in the constructor for my Qt main window I initialize an object of this
class called viewWidget and do:
Code:
osg::Camera * cam1 = viewWidget->createCamera(0,0,100,100);
QWidget * view1 = viewWidget->addToViewWidget(cam1, root);
setGeometry(100,100,800,600);
grid->addWidget(view1, 0, 0);
viewWidget->setLayout(grid);
setCentralWidget(viewWidget);
I am running all of this on linux (Fedora 15).
Thanks for any input!
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48417#48417
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org