summaryrefslogtreecommitdiffstats
path: root/examples/pdf/pdfviewer
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-02-18 21:42:35 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-02-20 09:48:59 +0100
commitf467edc97e66727be7fa3747913e4e01672d4b71 (patch)
treed55afd400b398585006bbdf092230b053a3358da /examples/pdf/pdfviewer
parent1acd9ad2bfa1c54f19fa8a71fb41e8a90233f76b (diff)
PdfMultiPageView: use TableView; horz. scroll; control page position
TableView is missing some features compared to ListView; so finding out where we currently are (which row) and programmatic positioning on a specific y coordinate of a specific row require some workarounds for now, including helpers in PdfDocument. TableView also assumes (and sporadically enforces) that all cells in a column have the same width. So we need a placeholder Item for each page. This also helps with rotation: the placeholder is now as wide as the window or the image, whichever is wider, and the "paper" is centered within; thus there's always room to rotate it. There's still some problem with setting contentY in goToPage() after the page has been zoomed to a size larger than the window: the values look correct, but it scrolls too far. But on the plus side, horizontal scrolling works. So now we attempt to control the horizontal position too: NavigationStack tracks it, and can go back to a previous position; and links can in theory jump to specific positions and zoom levels, scrolling horizontally such that a specific x coordinate is visible. Includes minor UI tweaks to make it look better on iOS. Change-Id: I643d8ef48ef815aeb49cae77dcb84c3682563d56 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/pdf/pdfviewer')
0 files changed, 0 insertions, 0 deletions