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. Render QWebView without showing it
Forum Updated to NodeBB v4.3 + New Features

Render QWebView without showing it

Scheduled Pinned Locked Moved Qt WebKit
3 Posts 2 Posters 5.3k 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.
  • D Offline
    D Offline
    Dii
    wrote on last edited by
    #1

    Hi All!

    I would like to render a QWebView widget without showing it, but it looks like it doesn't work. I want to print out a webpage, but don't want to show it on the GUI. I've successfully rendered QTextEdit and printed that in the past, but looks like it's not working with the webkit stuff, probably it relies on the render of the graphical system. If I load the webpage to the webview widget without showing it, the result is just an empty page.

    But if anyone knows a workaround, please share that, in the end I would like to have a CLI application of this project.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      You can just use QWebPage and render() its mainFrame() directly. Take a look at the webcapture example [1] and the PhantomJS project [2].

      [1] http://qt.gitorious.org/qt-labs/graphics-dojo/trees/master/webcapture
      [2] http://www.phantomjs.org/

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dii
        wrote on last edited by
        #3

        Thank you Peppe, I'll try that!

        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