[webkit-qt] QGraphicsWebView - resize to contents - Help?

viatcheslav.ostapenko at nokia.com viatcheslav.ostapenko at nokia.com
Mon Mar 21 14:56:37 PDT 2011


Take a look at this bug and discussion: https://bugs.webkit.org/show_bug.cgi?id=43852

Sl

From: webkit-qt-bounces at lists.webkit.org [mailto:webkit-qt-bounces at lists.webkit.org] On Behalf Of ext Felipe Crochik
Sent: Monday, March 21, 2011 5:51 PM
To: webkit-qt at lists.webkit.org
Subject: [webkit-qt] QGraphicsWebView - resize to contents - Help?

I really must be missing something obvious but I can't figure out what.

I have a QGraphicsWebView on a scene added to QGraphicsView. For "static" pages I can just use setResizesToContents(true) or manually resize my QGraphicsWebView when the main frame fires the "contentsSizeChanged" signal and everything works.

But when I have a "dynamic" page, like the mobile gmail, I have a big problem. If I use the setResizesToContents or process the main frame contentsSizeChanged signal I end up on an infiite loop.

Changing the size of the "QGraphicsWebView" triggers the javascript on the page to resize the contents to always be a little bit larger than the visible area that then make the mainframe size larger and I have to make the QGraphicsWebView and there we go again ...

If I only change the size of QGraphicsWebView once after the page is loaded I still end up with a scroll bar on my QGraphicsWebView because the javascript on the page will resize the contents/mainframe after I change the size of the QGraphicsWebView

It is such a "basic" problem that I can only assume there must be an obvious solution.

Thanks in advance,
Felipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20110321/db3c123f/attachment.html>


More information about the webkit-qt mailing list