QGraphicsView + QGraphicsProxy & QOpenGLWidget as item - drawing issue.
Dariusz last edited by
I'm doing some R&D on the idea of dropping openGL widget with scene/textures in to qgraphicsView as a qgraphicsItem/proxy.
Last time I did it it was working quite well, but lately, when I drop in I have a "ghosting" problems if I move the content inside openGL window everything becomes "smudged" - its like app freezes in windows and we move over it we have that nice "wave" pattern of ghosts...
I run my graphicsView with these flags:
setViewportUpdateMode(QGraphicsView::FullViewportUpdate); setRenderHints(QPainter::Antialiasing | QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform | QPainter::TextAntialiasing);
and QOpenGLwidget with this as clear method:
void paintGL() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL); glClearColor(0.5,0.2,1.0,0.7); sceneManager->draw(); notifyDisplayWidgetOfUpdate(); < pointer to QGraphicsProxyWidget - just telling him to "update()" so that it tells qgraphicsVIew to repaint that widget - I think...
Can any1 think of any reason for this?
https://pasteboard.co/HYmtjof.png < this should be 1 object, instead, I got the same object overpainted itself.
It seems that the only time when the widgets gets "cleared up" is when I resize the openGLWidget and it causes it to somehow properly repaint?
You should add:
- Which version of Qt you were using before
- Which version of Qt you are using now
- Graphics card + driver
- Platform you are running on