I want to implement page panning by manipulating the graphics item. Using the example available on /opt/qt4-maemo5/examples/maemo5/maemobrowser/ it's pretty much straight forward. However, since ajax http request doesn't reload the page, in order to invoke resizeWebViewToFrame() I needed to connect to contentsSizeChanged signal and then set qgwebview geometry.

connect(qgwebview->page()->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), this, SLOT(mycontentsSizeChanged(QSize)));


The problem is for instance if page1 content size is equal 800px height and page2 content size is equal 600px height. Since my viewport height is 600px so page1 requires scrollbar but not page2. What's happening is once I've set "qgwebview->setGeometry(QRectF(view->geometry().topLeft(), s));" on page1, page2 content size returns 800px height, which is at least controversial.

This approach seems to work if your page height increases gradually, however once a page content size is smaller than the previous then the value returned by contentsSizeChanged(QSize) is not valid.

I've tried changing the size/geometry of WebPage and WebFrame with no success, which was expected since they are not GGraphicsObjects. Any Suggestions???

Hopefully I could make my self clear, If don't please let me know.