Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Rendering the web-page in background
Forum Updated to NodeBB v4.3 + New Features

Rendering the web-page in background

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 2 Posters 3.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HaykG
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      benjamin.poulain
      wrote on last edited by
      #2

      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 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved