Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.2
-
None
Description
In a simple QML application like the one below, when using pinch-to-zoom on a PDF on a touch screen, sometimes the viewport jumps unexpectedly. Sometimes even 50 or 100 pages ahead.
I found the existing bug report QTBUG-135016, so I added console.warn to the PdfLinkDelegate inside PdfMultiPageView.qml to see if I actually do hit any links in the PDF, but these outputs never appeared, which might indicate a different problem altogether.
import QtQuick import QtQuick.Window import QtQuick.Pdf Window { width: 500; height: 500 visible: true PdfMultiPageView { anchors.fill: parent document: PdfDocument { source: <path to some local PDF with ideally 200+ pages or so> } } }
EDIT, 08 May '25: In the meanwhile I found out that if I use a QML Timer to steadily add an ever increasing value to the PdfMultiPageView's tableView.contentY (like an extra +25 every iteration), at one point it shows the same kind of seemingly random jump (I observed a jump from page 52 of a PDF to 14). So, the problem seems to be related to the fact that PdfMultiPageView is manipulating contentY directly (inside its PinchHandler) while TableView documentation even states that you should not do this, but use positionViewAtCell instead.