PDA

View Full Version : Qt.WA_TranslucentBackground.. not working over openGL view..



mtherrell
3rd February 2011, 22:26
i would like to have a QGraphicsView serve as a HUD over a 3rd-party openGL view (Maya modelPanel).

i am able to get my "overLay" window to be translucent when its over normal 3rd-party interface elements. but when it overlaps this openGL modelPanel, i cannot see the maya 3d view through my QGraphicsview background. (see attatched image)

i know it must be possible because if i do this: "window.setWindowOpacity", i can see the opengl view through the simiopaque window.

but i do not want my QGraphics Items etc to be transparent, only the background of the Scene.

how can i make only the background of the graphics scene transparent to both regular third party ui, and 3rd party opengl view?

(maya does have a pretty good API with the ability to draw native openGL stuff like a HUd over its views, but i want the QGraphics Scene functionality as a HUD without having to draw all my own 2d HUD using maya API)

thanks for any help!

mtherrell
4th February 2011, 04:34
sorry to reply to my own thread, but forgot to mention some important details:

this is Autodesk Maya 2011. Qt 4.5.3. on windows 7.
the Maya 2011 interface is now wrapped by QT 4.5.3., but many of the important interface elements are still the original native maya controls.. simply wrapped by QT.
this is the case with my problem of the Maya modelPanel viewport not showing through a QGraphicsView background.

the Maya modelPanel is not a QGLWidget, (as far as i can tell).. so it is not a simple matter of using QGL classes and functions to composite the two together.

one approach might be for me to find a way to openGL render the Maya scene graph myself in a QGL widge,t in essence, creating my own Qt modelPanel. but that sounds like a long hard road because i would have to mimic all of maya's user interactions with the3D elemets depicted in the scene.

another approach might be for me to somehow grab snapshots of the maya gl render output as they happen and draw them as the QGraphicsScene background. but that sounds like it could be slow, and i have no idea yet how to intercept the output of a modelPanel viewport in such a way as to get streaming pixamaps into the background of a graphics scene.

what i would love is if there is a way to have my "overlay" QgraphicsScene background demonstrate transparency over this maya modelPanel in a totally maya agnostic way.
much the same way that "window.setWindowOpacity(0.2)" does, but with the ability to have opaque items in the graphicsScene