Important: Please read the Qt Code of Conduct -

Rendering the web-page in background

  • 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);

    QPixmap: It is not safe to use pixmaps outside the GUI thread

    But I don't use any QPixmaps (I use QImage). Any Ideas?

  • 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.

Log in to reply