From 17f9e58022b181b1a097ec75cf824714778c8946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 9 Jan 2017 16:59:25 +0100 Subject: Emit a new signal when printing to a PDF file finishes [ChangeLog][Important Changes] Printing to a PDF file will now emit signal the signal pdfPrintingFinished in both QQuickWebEngineView and QWebEnginePage. The boolean passed with the signal to indicate if the printing and saving of the PDF was successful. The path of the created file is also passed to enable the user to map the signal to a print request. Task-number: QTBUG-56677 Change-Id: Ifab5a20b048f33a8cd872165bd4d453b01708037 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Leena Miettinen --- src/webengine/doc/src/webengineview.qdoc | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/webengine/doc/src') diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc index 418da9f9d..8135cad53 100644 --- a/src/webengine/doc/src/webengineview.qdoc +++ b/src/webengine/doc/src/webengineview.qdoc @@ -1108,12 +1108,32 @@ \sa recentlyAudible */ +/*! + \qmlsignal WebEngineView::pdfPrintingFinished(string filePath, bool success) + \since QtWebEngine 1.5 + + This signal is emitted when printing the web page into a PDF file has + finished. + \a filePath will contain the path the file was requested to be created + at, and \a success will be \c true if the file was successfully created and + \c false otherwise. + + \sa printToPdf() +*/ + /*! \qmlmethod void WebEngineView::printToPdf(const QString &filePath, PrintedPageSizeId pageSizeId, PrintedPageOrientation orientation) \since QtWebEngine 1.3 - Prints the WebEngineView's current content to a PDF document and stores it under \a filePath. The document's size will be determined - by the value of \a pageSizeId and its orientation will be determined using \a orientation. + Prints the WebEngineView's current content to a PDF document and stores it + under \a filePath. The document's size will be determined by the value of + \a pageSizeId and its orientation will be determined using \a orientation. + + This method issues an asynchronous request for printing the web page into a + PDF and returns immediately. To be informed about the result of the + request, connect to the signal pdfPrintingFinished(). + + \sa pdfPrintingFinished() */ /*! -- cgit v1.2.3