QGLWidget based drawing in QGraphicsScene or with QGraphicsView
Hi all,
I am adding a QGlwidget to the setviewport of QGraphicsView and by passing the window id of glwidget to a 3rd party library , it draws some graphics into the QGlwidget.
Where i am also drawing some graphic items into the QGraphicsScene and to maintain layering (underlay/Overlay) of items , setzvalue() of graphics item is used.
How about the graphics drawn in the QGLWidget , can it be brought in between the graphics items as underlay or overlay? Please advise.
If not can QGLwidget can be added as a graphics item to the QGraphicsScene and can the 3rd party library can draw graphics into it ...Is it possible? So that i can maintain the layering.
Please advise ...
Re: QGLWidget based drawing in QGraphicsScene or with QGraphicsView
You can partially control the layering mechanism by reimplementing the paint event and calling drawBackground(), drawItems() and drawForeground() manually the way you like it.