[Qt-interest] QWebView does not clip webpages correctly

Klimke, Jan Jan.Klimke at hpi.uni-potsdam.de
Tue Jun 9 10:23:38 CEST 2009


Hi,

I try to render an arbitary QtWidget into a framebuffer object which is afterwards used as texture for a quad in OpenGL rendering. This works quite well so far except for rendering embedded QWebViews. The images on webpages are rendered ignoring the extension of the QWebView (see screenshots). They overpaint some other widgets which have the same parent widget. It seems that the elements of the website are only clipped when they are completely (and not just partially) hidden. This is especially inconvenient for style or layout elements which might span the whole page.

This appeared since I switched the rendering mechanism from rendering  a Qpixmap first and then create a texture from it to using the framebuffer object for rendering an texturing.

What can I do about this ? Anybody has a hint ?


Screenshots:

http://dl.getdropbox.com/u/808565/screenshot_090528182444735.jpg
http://dl.getdropbox.com/u/808565/screenshot_090528182607566.jpg
http://dl.getdropbox.com/u/808565/screenshot_090529112056198.jpg (especially unusable)



Initialization:

proxyWidget = new QGraphicsProxyWidget(0);
proxyWidget->setWidget(renderWidget);
proxyWidget->show();


fbo = new QGLFramebufferObject(renderWidget->size(),GL_TEXTURE_2D);
renderWidget->render(fbo);

update code:

updateTexture(){
  renderWidget->layout()->update();
  renderWidget->render(fbo);
}

Kind regards,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090609/199b006f/attachment.html 


More information about the Qt-interest-old mailing list