diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-02-05 15:53:57 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-02-11 08:29:28 +0100 |
commit | 09a6eac4a63b32548ecc1ff5b16a5d8fc3ba1c04 (patch) | |
tree | 924c615feb59f8d3372886ec53121b05b1701d28 /examples | |
parent | 25a371caa376c513f22d5c01e425a18629657fdc (diff) |
Add QPdfDestination; NavigationStack stores page, location and zoom
Push/back/forward behavior seems more correct now, but still no
autotest yet.
QPdfDestination might be useful to represent locations of search results,
for link destinations and maybe named destinations too.
Fixes: QTBUG-77512
Change-Id: I113b2c535a2cd302106e6546104c64e12985d387
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pdf/pdfviewer/viewer.qml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/pdf/pdfviewer/viewer.qml b/examples/pdf/pdfviewer/viewer.qml index a8e581a45..095bc3985 100644 --- a/examples/pdf/pdfviewer/viewer.qml +++ b/examples/pdf/pdfviewer/viewer.qml @@ -140,7 +140,7 @@ ApplicationWindow { from: 1 to: document.pageCount editable: true - onValueChanged: pageView.currentPage = value - 1 + onValueChanged: pageView.goToPage(value - 1) Shortcut { sequence: StandardKey.MoveToPreviousPage onActivated: currentPageSB.value-- @@ -223,7 +223,6 @@ ApplicationWindow { PdfPageView { id: pageView -// currentPage: currentPageSB.value - 1 // TODO should work but ends up being NaN in QQuickSpinBoxPrivate::setValue() (?!) // onCurrentPageChanged: currentPageSB.value = pageView.currrentPage + 1 onCurrentPageReallyChanged: currentPageSB.value = page + 1 |