Rendering the web-page in background
-
wrote on 26 Aug 2010, 14:25 last edited by
I need to render the page content in a background thread. Is there a way to do it? It gives an error with following code:
@
void myThread::run()
{
QImage image = QImage(QSize(100, 100), QImage::Format_ARGB32_Premultiplied);
QPainter painter(&image);
mainFrame->render(&painter);
}
@QPixmap: It is not safe to use pixmaps outside the GUI thread
But I don't use any QPixmaps (I use QImage). Any Ideas?
-
wrote on 27 Aug 2010, 12:52 last edited by
This is not safe either. QImage is reentrant, but QWebFrame is not thread safe.
There is really nothing you can do without explicit locking. WebKit is simply not designed to be thread safe.
1/2