layering a QGLWidget on top of a qwidget
I’m writing what is essentially a multi-trace oscilloscope viewer. It appears that the most efficient way to draw the traces of the signal is to use raw OpenGL draw commands, i.e., in my paintGL() :
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, GL_FLOAT, 0, data.constData());
- glDrawArrays(GL_LINE_STRIP,0,data.size()-1);
- glDisableClientState(GL_VERTEX_ARRAY);
Ideally, I want to have the borders and tick marks for this line (which is constantly moving) drawn in a QWidget that lives below the qglwidget. However, I can’t seem to get this to work. If I don’t make the QGLWidget draw a background, I see through to my desktop underneath. Any hints at how to stack a transparent QGLWidget on top of a QWidget?
thanks!
2 replies
You must log in to post a reply. Not a member yet? Register here!


