Hi Alexandre,

Is it simply that you want to know how to render HUD?  Have a look at
the osghud example, this should be adaptable to handle the needs of a
Qt texture quad.

Robert.

On 20 May 2012 22:01, Alexandre Champion <[email protected]> wrote:
> Hi all,
>
> Is there a solution to have QWidgets over an OSG scene ?
>
> I know about osgQt. With osgQt::GraphicsWindowQt and osgQt::GLWidget you
> can setup a working OSG/Qt environment in less than five minutes, it works 
> great.
>
> osgQt::QWidgetImage is great if you want to embed a QWidget as a 3D object
> inside of an OSG scene. But if you want to embed a QWidget as a HUD, it is 
> more
> work where a simple show() or addWidget() would do in Qt. Moreover, 
> QWidgetImage
> still has some issues (Editing in the QTextEdit doesn't work, Operations on 
> floating
> windows, QGraphicsView's scrollbars don't appear...), so it is not a solution.
>
> Three years ago, Robert Osfield wrote a topic about "Development of Qt support
> as part of osgViewer". Martin Beckett answered by suggesting :
>
>
> mgb_osg wrote:
>>
>> One feature that would be nice is support for Qt widgets being drawn within 
>> OSG
>> (labs trolltech com/blogs 2008 06 27 accelerate-your-widgets-with-opengl)
>> (doc qt nokia com/qq qq26-openglcanvas)
>>
>
>
> (Sorry but I can not properly post URL's/Links yet, this is my first post)
>
> And indeed, the solution covered in the article is very appealing.
>
> It works as a normal QGraphicsView/QGraphicsScene design. The QGraphicsView
> has a QGLWidget as a viewport. The QGraphicsScene manages the QWidgets
> through the addWidget() method. The Scene rendering is done in the 
> drawBackground()
> QGraphicsScene's method, then Qt renders the QWidgets on top. So you manage
> your QWidgets the same way you would in any other Qt applications.
>
> As anyone implemented this solution yet ? Or am I missing an obvious solution 
> ?
>
> Thank you !
>
> Cheers,
> Alexandre
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47783#47783
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to