summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSafiyyah Moosa <safiyyah.moosa@qt.io>2024-04-08 19:57:07 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2024-04-30 02:22:01 +0000
commit1b72c11e36b2f52c891fce4e43af408b113d60b7 (patch)
tree78172ddd2155ce297ad679cfef24261dcf29c272
parentff24c9af80f2fe73e8022a2fc490ac65ce453f97 (diff)
Doc: Update PdfPageView code snippet
The PdfPageView QML Type documentation contains a code snippet. The code snippet should demonstrate how to use the PdfPageView QML type, however it uses the PdfMultiPageView QML type instead. This fix creates a new code snippet that implements the PdfPageView QML type. This snippet replaces the incorrect snippet that was used previously. Fixes: QTBUG-123536 Pick-to: 6.7 Change-Id: I319b4d86133d7dc41664229110a6c13ed46b7e80 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--src/pdf/doc/snippets/pdfpageview.qml12
-rw-r--r--src/pdfquick/PdfPageView.qml2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/pdf/doc/snippets/pdfpageview.qml b/src/pdf/doc/snippets/pdfpageview.qml
new file mode 100644
index 000000000..5e233961a
--- /dev/null
+++ b/src/pdf/doc/snippets/pdfpageview.qml
@@ -0,0 +1,12 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+//! [0]
+import QtQuick
+import QtQuick.Pdf
+
+PdfPageView {
+ document: PdfDocument { source: "my.pdf" }
+}
+//! [0]
+
diff --git a/src/pdfquick/PdfPageView.qml b/src/pdfquick/PdfPageView.qml
index 290570f2b..e1d97f57b 100644
--- a/src/pdfquick/PdfPageView.qml
+++ b/src/pdfquick/PdfPageView.qml
@@ -30,7 +30,7 @@ Rectangle {
A PdfDocument object with a valid \c source URL is required:
- \snippet multipageview.qml 0
+ \snippet pdfpageview.qml 0
*/
required property PdfDocument document