0

I have just read here that "Qt transparent windows over an OpenGL viewport" :

enter image description here

But if I try to add some widgets (let's say a checkbox) over a frame, and via code, add a QGLWidget to this frame.. it does not render the widget.

How to achieve this effect? possibly keeping on using Qt Designer.

EDIT: due to the comment I have to specify that the problem I am experiencing is that every kind of widgdet OVER a QGLWidget seems not to be rendered anymore (because of some opengl context black magic?)

2
  • you can move the geometry of any QWidget over another widget, and hide it anytime. ie, QGlWidget's geometry inside a QMainWindow is (0, 0, 400, 300). So set new widget's gemoetry to ( 10, 10, 50, 50) in respect of QMainWindow. Oct 14, 2013 at 20:37
  • sorry but my question is not about geometry but about the effect I'm exeperiencing that any kind of widget over a QGLWidget seems to not be rendered
    – nkint
    Oct 15, 2013 at 11:15

1 Answer 1

0

There's a good piece in the Qt Quarterly about how to do it: QQ: Accelerate Your Widgets With OpenGL. It does entail some large changes to move away from QGLWidget, but it seems reasonably straightforward to implement.

1
  • I have downloaded that example and it does not working with Qt 4.8 (no render, even the background color is not showed).
    – nkint
    Nov 18, 2013 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.