[osg-users] [Qt] Create a HUD (by using QGraphicsView / QGraphicsScene )

2015-01-22 Thread Nicolas MORENO
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


Re: [osg-users] [Qt] Create a HUD (by using QGraphicsView / QGraphicsScene )

2015-01-29 Thread Nicolas MORENO
Hi,

I have a look on the osgQtWidgets example but the only HUD create is into the 
OSG view. I try to found a solution by using Qt Baxos exemple. I can display 
OSG into QGraphicsScene but I lost all interaction.

I found a topic talking about this (I cant post URL yet).
Into it, a post talk about osgQtWidgets example but there is no QWidget on a 
GLWidget exemple.

As anyone can help me ?
... 

Thank you!

Cheers,
Nicolas

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62514#62514





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org