The best overview comes from examples/osgQtWidgets/osgQtWidgets.cpp...
//We would need to document the following somewhere in order to guide people on
//what they need to use...
//
//----------------------------------------------
//There are two angles to consider.
//
//1. If someone wants a widget in their Qt app to be an OSG-rendered scene, they
//need GraphicsWindowQt (in the osgViewerQtContext example) or QOSGWidget (in
the
//osgViewerQt example). These two allow both OSG and Qt to manage their threads
//in a way which is optimal to them. We've used QOSGWidget in the past and had
//trouble when Qt tried to overlay other widgets over the QOSGWidget (since OSG
//did its rendering independently of Qt, it would overwrite what Qt had drawn).
I
//haven't tried GraphicsWindowQt yet, but I expect since it uses QGLWidget, it
//will result in Qt knowing when OSG has drawn and be able to do overlays at the
//right time. Eventually GraphicsWindowQt can be brought into osgViewer I
imagine...
//
//2. If someone wants to bring Qt widgets inside their OSG scene (to do HUDs or
//an interface on a computer screen which is inside the 3D scene, or even
//floating Qt widgets, for example). That's where QGraphicsViewAdapter +
//QWidgetImage will be useful.
//----------------------------------------------
I've used both QOSGWidget and GraphicsWindowQt in full blown Qt applications.
In both cases I made classes that inherited one of the above along with
osgViewer::View. QOSGWidget works pretty well as is. I had to break the
GraphicsWindowQt constructor into parts to use a QWidget created elsewhere
in the Qt application.
-Don Leich
>
> Hi,
>
> is there meanwhile a sort of standard way of integration osg views as qt
widgets in a way that allows to handle them like normal widgets on the qt side ?
>
> Thank you!
>
> Cheers,
> Jan
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org