Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-136062

PdfMultiPageView sometimes does unexpected jumps when ending pinch gesture

    XMLWordPrintable

Details

    • Linux/X11

    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. 

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            chris_w_ Chris Wolkenfelt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes