diff options
Diffstat (limited to 'src/pdf/doc/snippets')
-rw-r--r-- | src/pdf/doc/snippets/multipageview.qml | 11 | ||||
-rw-r--r-- | src/pdf/doc/snippets/pdfpageview.qml | 12 | ||||
-rw-r--r-- | src/pdf/doc/snippets/qtpdf-build.cmake | 4 | ||||
-rw-r--r-- | src/pdf/doc/snippets/qtpdf_build_snippet.qdoc | 33 |
4 files changed, 27 insertions, 33 deletions
diff --git a/src/pdf/doc/snippets/multipageview.qml b/src/pdf/doc/snippets/multipageview.qml new file mode 100644 index 000000000..113444165 --- /dev/null +++ b/src/pdf/doc/snippets/multipageview.qml @@ -0,0 +1,11 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//! [0] +import QtQuick +import QtQuick.Pdf + +PdfMultiPageView { + document: PdfDocument { source: "my.pdf" } +} +//! [0] 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/pdf/doc/snippets/qtpdf-build.cmake b/src/pdf/doc/snippets/qtpdf-build.cmake index d46b9c3ee..b4372d411 100644 --- a/src/pdf/doc/snippets/qtpdf-build.cmake +++ b/src/pdf/doc/snippets/qtpdf-build.cmake @@ -1,2 +1,2 @@ -find_package(Qt5 COMPONENTS Pdf REQUIRED) -target_link_libraries(mytarget Qt5::Pdf) +find_package(Qt6 REQUIRED COMPONENTS Pdf) +target_link_libraries(mytarget Qt6::Pdf) diff --git a/src/pdf/doc/snippets/qtpdf_build_snippet.qdoc b/src/pdf/doc/snippets/qtpdf_build_snippet.qdoc index 25593b1ee..7d30ccdfd 100644 --- a/src/pdf/doc/snippets/qtpdf_build_snippet.qdoc +++ b/src/pdf/doc/snippets/qtpdf_build_snippet.qdoc @@ -1,35 +1,6 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only //! [0] QT += pdf //! [0] - - -//! [1] -#include <QtPdf> -//! [1] |