Program crashes from QWebFrame::Render() method

I would like to create an image of the current loaded web page. As I see there is a way to do it :). The proper way is described in QWebPage class reference in Assistant. Qt says that if you want to create the image of the web page try following code:

This works ok for a web-pages with small content. But try something which has a content about 1008X46657 which is actually realistic (e.g. http://www.imdb.com/title/tt0108757/fullcredits). It starts to render and it doesn't finish.... Sometimes it gives a segmentation fault sometimes it just hangs in that way without giving user ability to have input on that widget.

Now I'd like to ask my questions about this issues:

How can I make this image created for long web pages? Is there any idea which will work better?

I'd like to do this rendering process in background (within another thread) as it is time consuming and I don't want to block my user for using the browser, but Qt yields on me when I call that QWebFrame::Render() method outside of a GUI thread.

With this example you will not get the whole representation of the page. I want that image will represent the whole web page content (I'm creating a small viewer which represents the content of the web page). With your example the row size.setHeight(size.width() * m_TargetSize.height() / m_TargetSize.width()); makes not available to render the page with whole height.

I'm convenient with QThread, the problem is that QWebFrame::render() method uses QPixmap's in it's implementation and it is not available to move it to other thread. Also that render() method is most time consuming part of the algorithm (no need to create a thread if I will do the time consuming part of the algorithm in the main thread).