0
votes

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?)

1
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.Md. Minhazul Haque
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 renderednkint

1 Answers

0
votes

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.