diff options
author | Shawn Rutledge <[email protected]> | 2024-12-17 08:29:40 +0100 |
---|---|---|
committer | Shawn Rutledge <[email protected]> | 2025-06-20 17:43:03 +0200 |
commit | 472eb06f70730ee61e47e852ab352539697fa881 (patch) | |
tree | 25da332911218eb1c6d181286a46aa7827bf2dde /src/quickcontrols/fusion/ComboBox.qml | |
parent | e5522fe5bd603801537880ecbc9a3842c634b9e4 (diff) |
Setting `interactive: false` on TableView is drastic (except perhaps in
some mode that the user can enter somehow), but setting
`acceptedButtons: Qt.NoButton` should be the default, to have flicking
on touchscreens but avoid dragging by mouse. This is possible since
cbc694491b8431fd3dcf82c3d17a17a06cbccebc (but the default was not
changed, for fear of surprising users with a behavior change).
So now QQuickSelectionRectanglePrivate::updateSelectionMode() allows
dragging in either case, via all devices if the TableView is not
interactive, or mouse-only if the flicking is touch-only.
Long-press has so far been allowed to select only in the case when
dragging cannot select. But if the TableView has interactive: true,
then you can flick it on a touchscreen, regardless of how
acceptedButtons is set, even though we may expect the user to select
dragging the mouse. So now if `selectionMode: Auto` is declared, and
touch flicking works, we allow the long-press to select, because
otherwise there would not be a way to make a selection on a touchscreen.
We should not consider `interactive: false` to be normal (unless the
developer finds a need to disable scrolling in some unique modal use
case that can be exited somehow). `acceptedButtons: Qt.LeftButton`
is not a very useful setting either (even though it's still the
default).
The snippet is improved to illustrate, along with some drive-by's.
Docs explain the behavior in more detail. Test coverage is added in the
manual test and the autotest.
Pick-to: 6.9 6.10
Task-number: QTBUG-97111
Task-number: QTBUG-132268
Change-Id: I912dbc7bf8de536794b5bdcc1269bf2860645de9
Reviewed-by: Richard Moe Gustavsen <[email protected]>
Diffstat (limited to 'src/quickcontrols/fusion/ComboBox.qml')
0 files changed, 0 insertions, 0 deletions