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

Felipe Crochik felipe at crochik.com
Mon Mar 21 15:10:30 PDT 2011


Thank you.

Just to make sure: this is actually a bug that most likely will be fixed on
new releases of Qt Webkit but for the current Qt4.6/4.7 there isn't much it
can be done, right?

 

I should have asked hours ago (or been better using google :-) ).

 

Felipe

 

  _____  

From: viatcheslav.ostapenko at nokia.com
[mailto:viatcheslav.ostapenko at nokia.com] 
Sent: Monday, March 21, 2011 5:57 PM
To: webkit-qt at lists.webkit.org
Cc: felipe at crochik.com
Subject: RE: [webkit-qt] QGraphicsWebView - resize to contents - Help?

 

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/4bbd7dd8/attachment.html>


More information about the webkit-qt mailing list