PdfLinkModel QML Type
PDF文書内のリンクの表現。詳細...
| Import Statement: | import QtQuick.Pdf |
プロパティ
詳細な説明
PdfLinkModel は、指定されたpage が含む各リンクのジオメトリとリンク先を提供します。
利用可能なモデルの役割は以下の通りです:
| 定数 | 説明 |
|---|---|
rectangle | リンクを囲む矩形。 |
url | リンクが Web リンクの場合はその URL、そうでない場合は空の URL。 |
page | リンクが内部リンクの場合、リンクがジャンプするページ番号;そうでなければ-1 。 |
location | リンクが内部リンクの場合、リンクがジャンプするページ上の場所。 |
zoom | リンクが内部リンクの場合、ジャンプ先のページでのズームレベル。 |
通常、 こ れはRepeater と と も に用い ら れ、 リ ン ク を視覚化 し 、 それを ク リ ッ ク す る 機能を提供 し ます:
Repeater { model: PdfLinkModel { document: root.document page: image.currentFrame } delegate: Rectangle { required property rect rectangle required property url url required property int page color: "transparent" border.color: "lightgrey" x: rectangle.x y: rectangle.y width: rectangle.width height: rectangle.height HoverHandler { cursorShape: Qt.PointingHandCursor } TapHandler { onTapped: { if (page >= 0) image.currentFrame = page else Qt.openUrlExternally(url) } } } }
注 : 汎用 PDF 表示機能はPdfScrollablePageView とPdfMultiPageView で提供 さ れてい ます。PdfLinkModel は、 PDF 表示 コ ン ポーネ ン ト を ス ク ラ ッ チか ら ビル ド す る 際にのみ必要です。
プロパティ文書
document : PdfDocument
このプロパティは、リンクが見つかるPDF文書を保持します。
page : int
このプロパティは、リンクが見つかるページ番号を保持する。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.