Results 1 to 2 of 2

Thread: How to use QtWebEngine to take a full web page screenshot?

  1. #1

    Default How to use QtWebEngine to take a full web page screenshot?

    You can render QWebEngineView as follows:

    QSize size=page()->contentsSize().toSize();
    int w=size.width();
    int h=size.height();
    image=new QImage(w,h, QImage::Format_ARGB32);
    painter = new QPainter(image);
    render(painter);
    image->save(filename);

    But this only renders the widget to the image, not the whole web page. If the size of the widget is smaller than the whole web page, some of the web page is not shown on the widget, thus not rendered to the image. How to render the whole web page to the image?

  2. #2
    Join Date
    Aug 2010
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to use QtWebEngine to take a full web page screenshot?

    Did you ever find a solution to this?

Similar Threads

  1. QupZilla is now using the QtWebEngine
    By ravas in forum Qt-based Software
    Replies: 0
    Last Post: 17th April 2016, 18:00
  2. Capture full page with QWebEngineView
    By domusmaximus in forum Qt Programming
    Replies: 0
    Last Post: 15th January 2016, 22:50
  3. [Qtwebengine] Running Chrome Apps in QtWebEngine
    By raunvivek in forum General Discussion
    Replies: 0
    Last Post: 9th July 2015, 14:32
  4. QtWebKit: Can’t load full html code from page
    By soloma_lviv in forum Qt Programming
    Replies: 0
    Last Post: 15th April 2012, 12:48
  5. Printing a pixmap full page: strange behavior on Windows
    By Pieter from Belgium in forum Qt Programming
    Replies: 8
    Last Post: 3rd March 2008, 13:29

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.