aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2024-06-18 00:13:30 -0700
committerShawn Rutledge <shawn.rutledge@qt.io>2024-07-02 12:14:56 -0700
commitcbc694491b8431fd3dcf82c3d17a17a06cbccebc (patch)
tree670b433463e1aef88f5af80c2648ab9d5cfc008d /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
parent24d51ce29ef03464bdcc86d71e4af18192d1f58f (diff)
Add Flickable.acceptedButtons property
Presumably in Qt 4 times, before multi-touch was commonplace, someone assumed that touch events could be handled the same as mouse events. And until d7623d79ef4bc9533fced027bf1d173d68b4eba6 Flickable relied upon touch->mouse synthesis anyway. In Qt 5, it was possible to make a distinction by checking QMouseEvent::source() (although if a mouse event is synthesized, it might or might not have come from a touchscreen); but we didn't use it in Flickable. Now, the ability to scroll a Flickable by dragging the mouse has become a pure anachronism, not really useful in any UI where a mouse would normally be used (except perhaps for testing touch-like behavior when the developer doesn't have a touchscreen). And if the developer wants the mouse-drag gesture to do something else with content inside Flickable, the fact that Flickable is always trying to take over the grab (at least in one direction) interferes. So let's make it an opt-out feature in Qt 6. Perhaps it should be opt-in in Qt 7, but this is not yet done. [ChangeLog][QtQuick][Flickable] Flickable.acceptedButtons has been added with default Qt.LeftButton; set it to Qt.NoButton to disallow scrolling by dragging the mouse. Fixes: QTBUG-97111 Change-Id: I46026edf4cd35d2b945659e814ee6ca3c892ce9d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
0 files changed, 0 insertions, 0 deletions