I had a certain amount of bother messing about with this code last week. In the 
end, I found out that the OpenSceneGraph Cookbook example set up its 
InteractiveImageHandler for a 2D overlaid widget with just

new osgViewer::InteractiveImageHandler(widgetImage.get());

rather than

new osgViewer::InteractiveImageHandler(widgetImage.get(), texture, camera);

as the bundled OSG example does. The latter was automatically resizing stuff 
and causing all manner of trouble.

-----Original Message-----
From: Robert Osfield
Hi Max,

Just place the OSG/Qt widget subgraph below an orthographic Camera to create 
the HUD effect you are after.  See the osghud example.

Robert.

On 16 August 2012 09:26, Max Sergeev <[email protected]> wrote:
> Hello!
>
> I'm kind of newbie in both OSG and Qt, still I'm trying to make Qt HUD upon 
> my OSG window, what I want is Qt interface elements fixed inside OSG scene, 
> not spinning with the model. The thing is, I need Qt elements INSIDE osg 
> scene, not OSG scene inside Qt window (like in OSGviewerQt example).
>
> What I've got yet is OSGQtWidgets example with --useWidgetImage --fullscreen 
> arguments, which shows fixed Qt controls ontop of OSG Model. The thing is, it 
> creates new (FIXED) camera for qt element ontop of OSG model -- because of 
> that, user cannot spin and move OSG model because camera is not transparent.
>
> So the question is: is there a way to make transparent camera with useable Qt 
> elements in it? Or is there some other way to achieve my goals?
>
> Thank you in advance!
>
> Cheers,
> Max
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to