diff options
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 4 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 0a27a3938..1d7660711 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1722,7 +1722,7 @@ void QWebEnginePage::printToPdf(const QString &filePath, const QPageLayout &page /*! - \fn void QWebEnginePage::printToPdf(const QPageLayout &pageLayout, FunctorOrLambda resultCallback) + \fn void QWebEnginePage::printToPdf(FunctorOrLambda resultCallback, const QPageLayout &pageLayout) Renders the current content of the page into a PDF document and returns a byte array containing the PDF data as parameter to \a resultCallback. The page size and orientation of the produced PDF document are taken from the values specified in \a pageLayout. @@ -1732,7 +1732,7 @@ void QWebEnginePage::printToPdf(const QString &filePath, const QPageLayout &page \since 5.7 */ -void QWebEnginePage::printToPdf(const QPageLayout &pageLayout, const QWebEngineCallback<const QByteArray&> &resultCallback) +void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &resultCallback, const QPageLayout &pageLayout) { Q_D(QWebEnginePage); quint64 requestId = d->adapter->printToPDFCallbackResult(pageLayout); diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h index bc6d101a1..3c3a28d80 100644 --- a/src/webenginewidgets/api/qwebenginepage.h +++ b/src/webenginewidgets/api/qwebenginepage.h @@ -272,11 +272,11 @@ public: void setAudioMuted(bool muted); bool recentlyAudible() const; - void printToPdf(const QString &filePath, const QPageLayout &layout); + void printToPdf(const QString &filePath, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF())); #ifdef Q_QDOC - void printToPdf(const QPageLayout &layout, FunctorOrLambda resultCallback); + void printToPdf(FunctorOrLambda resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF())); #else - void printToPdf(const QPageLayout &layout, const QWebEngineCallback<const QByteArray&> &resultCallback); + void printToPdf(const QWebEngineCallback<const QByteArray&> &resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF())); #endif const QWebEngineContextMenuData &contextMenuData() const; |