Sunday, 15 May 2011

qt - Transparent QGraphicsWebview over QGLWidget leads to super imposed images -



qt - Transparent QGraphicsWebview over QGLWidget leads to super imposed images -

i have transparent qgraphicswebview within qgraphicsview next settings:

the qgraphicsview high level widget, , shown in total screen mode the graphics view uses qglwidget view port (to utilize opengl-es) alpha channel , double buffering enabled in qglwidget transparency achieved graphicsview->setstylesheet("background:transparent") following attributes set qgraphicsview , qgraphicswebview wa_translucentbackground = true wa_nosystembackground = true wa_opaquepaintevent = false the qpalette::base , qpalette::window brushes of webview , webview->page() set qt::transparent

at beginning, transparency works fine. screen updated (when scroll), looks new bitmap blended on top of existing 1 superimposed picture. after 5-6 screen updates, blending causes colors accumulate , form opaque rectangle (with corrupted image). next images show first, sec , final stages of problem.

how tell qt/opengl stop blending , draw new image frame buffer? tried calling fillrect(boundrect(), qt::transparent) overridden webview::paint , graphicsview::paintevent; didn't work except making updates slower.

i new qt , opengl, might missing basic flags or settings.

i tried methods mentioned above. did not work me. debugged qtbase code , found setting opacity level create top browser layer transparent.

this->setopacity(0.1);

this pointer points qgraphicswebview object.

with method, whole front end browser contents including background transparent. separate header, paragraph , background , specify different transparent levels them, have dig webkit code little farther figure out problem. now, setopacity() did trick , plenty doing.

qt opengl opengl-es qgraphicsview qwebview

No comments:

Post a Comment