Solved How to save website as image using Qt.
-
Hi All,
How to save webpage to image using qt.
Regards,
Siddharth. -
Hi
A webpage is hard to save as an image as such.But you could use
http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html
To take a picture of it.So you could open page in browser and take picture.
Else you need to use webkit and print to pdf. for something like a picture.
-
Hi
thanks for ur reply..
using above technique can I get a full webpage?thanks
Siddu.. -
well only if full page is shown on screen.
Else you can use
http://doc.qt.io/qt-5/qwebview.html#details
and see if u can make it render to a pdf.Why you need web pages as an images ?
-
Thank for your quick reply.
I have create small project to export to image(like export to pdf).Thanks,
Siddu -
@Shidharth
Ok, then Qwebview and QPrinter
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFormat(QPrinter::PdfFormat);
Might work. -