Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.2
-
None
-
Windows 10 ver 1709 x64
* MSVC2017 x64, Qt 5.9.2
* Self-built Qt 5.9.2 with mingw-w64 x64
Description
When using `QScroller::grabGesture(widget, QScroller::TouchGesture)`, the widget captures the touch gestures but the system synthesized mouse events aren't ignored by the widget. This can cause some weird behaviours for certain widgets.
Using `QScroller::grabGesture(widget, QScroller::LeftMouseButtonGesture)` produces the expected result.
To reproduce:
- Use Pixelator example https://doc.qt.io/qt-5/qtwidgets-itemviews-pixelator-example.html as base
- In `mainwindow.cpp`, add `#include <QScroller>` to the top, and the following at the end of `MainWindow::MainWindow()`:
view->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); view->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); QScroller::grabGesture(view, QScroller::TouchGesture);
- Build and run program
- Use touchscreen to scroll the `QTableView` by dragging inside it, notice that some of the cells gets selected, also there may be some jumping due to bugged autoscroll
- Change `QScroller::TouchGesture` to `QScroller::LeftMouseButtonGesture`, rebuild and run program
- Use touchscreen to scroll the `QTableView` by dragging inside it, notice that the cells doesn't get selected. Same with mouse dragging.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-64440 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
478603,4 | Extends PressDelayHandler to support delayed touch events | 5.12 | qt/qtbase | Status: NEW | 0 | 0 |