Hi,
I work on a project using OSG (with OSG Earth). I create HMI with Qt and add
OSG (Earth) view using osgQt::GLWidget devived class
(osgEarth::QtGui::ViewerWidget ) and it's work fine.
My application needs a HUD over the OSG widget but when I display QWdiget over
the GLWidget, it has a black background (only when it is over the GLWidget).
It's look like Qt can do transparency when OSG widget is behind. There is a
solution for this ?
On the net, I found information about QGraphicsView and QGraphicsScene to make
a HUD but when I try to use it, ma application crash to runtime with a lot of
OpenGl error.
My code looks like :
Code:
_viewerWidget = new GLWidget(viewer);
_viewerWidget->setAutoFillBackground(true);;
_views.clear();
_viewerWidget->getViews( _views );
_viewerWidget->makeCurrent();
QGraphicsView* view = new QGraphicsView();
view->setViewport(_viewerWidget);
view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
QGraphicsScene* scene = new QGraphicsScene();
scene->addWidget(new LeftPanel());
view->setScene(scene);
// Add to MainWindow
_ui.widgetForOsg->layout()->addWidget(view);
I have a look to osgQtWidgets example but I don't found how to use correctly
QGraphicsView and QGraphicsScene.
Can you help me please ?
Thank you!
Cheers,
Nicolas
PS: sorry for my (low) level of english[/code]
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62437#62437
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org