diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-05-30 11:34:17 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-06-04 20:55:31 +0200 |
commit | 35697c1ded0577e88e774917a8ead31d7445465a (patch) | |
tree | c1bd34898b36308e806cfe1d3beae5d90b8449e5 /tests/manual/quick/pdf/bookmarks-list.qml | |
parent | af4f03f51fc647c48968e149799cd35ab161dc55 (diff) |
Add QPdfDocument::pageLabel(int) and pageModel property
This API is available for both C++ and QML.
The pageModel makes it easier to populate item-views with per-page
information, such as thumbnails labeled with page labels.
Fixes: QTBUG-102271
Change-Id: I70df481b378efed0327e7bb89a63c7669daecc70
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/manual/quick/pdf/bookmarks-list.qml')
-rw-r--r-- | tests/manual/quick/pdf/bookmarks-list.qml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/manual/quick/pdf/bookmarks-list.qml b/tests/manual/quick/pdf/bookmarks-list.qml index a4c030ea5..fd6c38b54 100644 --- a/tests/manual/quick/pdf/bookmarks-list.qml +++ b/tests/manual/quick/pdf/bookmarks-list.qml @@ -87,11 +87,10 @@ ApplicationWindow { width: parent.width text: model.title background: Item { } - onClicked: image.currentFrame = pageNumber + onClicked: image.currentFrame = page } model: PdfBookmarkModel { document: root.doc - structureMode: PdfBookmarkModel.ListMode } } } @@ -179,6 +178,6 @@ ApplicationWindow { } Text { anchors { bottom: parent.bottom; right: parent.right; margins: 6 } - text: "page " + (image.currentFrame + 1) + " of " + doc.pageCount + text: "page " + doc.pageLabel(image.currentFrame) + " of " + doc.pageCount } } |