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

Touch event is stolen from QPdfVIew (or more generally QAbstractScrollArea?) under certain environment on Windows

    XMLWordPrintable

Details

    • Windows

    Description

      The easiest way to the issue is to use PDF Viewer Widget example. But notice that with Qt6 one has to add

      QScroller::grabGesture(ui->pdfView);
      

      to "MainWindow" constructor in order to make the pdfView flickable. pdfView is flickable out of the box in Qt5 for some unknown reason.

      So one is going to load a PDF file, flick the view to give it enough momentum and just let it go with that momentum (without further scrolling with finger). While scrolling slows down to almost stopping speed, flick with finger again. Then you will find it is not possible. pdfView does not respond to flicking anymore. To catch that "almost stopping" moment, it's better to shrink the window, or load a very long PDF.

      I don't know what's there hindering touch event being delivered to pdfView again. But this problem cannot be reproduced with simpler sample. I tried with minimal QPdfView and QScrollArea - they scroll just fine (see the attached sample - notice it is NOT a reproducer but a proof that the problem may not be QAbstractScrollArea itself).

      Also, I don't know if it affects normal gesture like swiping on trackpad. Since that does not give pdfView enough momentum - it stops almost immediately and it's impossible to catch that "almost stopping" timing.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-127006
          # Subject Branch Project Status CR V

          Activity

            People

              fredericl Frederic Lefebvre
              luqiaochen Luqiao Chen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change