aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktestutils/quick/visualtestutils.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-02-24 09:00:48 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2022-07-16 12:34:14 +0200
commit650342de792e0ab37ce8bac8ccde21ab9b96b2c9 (patch)
tree495828614cff8e8a019cc5ed0c8964b727c63cc4 /src/quicktestutils/quick/visualtestutils.cpp
parent7e4b17943029b502cde63939a47f38ef900a9479 (diff)
TextInput/Field: selectByMouse default=true, but not on touchscreens
When you drag a finger across a TextInput or TextField, it should not select text. - your finger probably covers several characters, so you can't see where you're selecting until afterwards - if the item is in a Flickable, flicking by touch should be prioritized - if flicking happens, the text cursor should not move; but to avoid losing too much functionality, we allow it to move on release, if the TextInput or TextField gets the release (i.e. if it still has the exclusive grab) - TextField's pressed, pressAndHold and released signals continue to behave the same with touch as with mouse So now we distinguish mouse events that are synthesized from non-mouse devices and avoid mouse-like behaviors as described above, but there is no behavior change if the event comes from an actual mouse or touchpad. Since most users want selecting text by mouse to "just work", and an actual mouse is precise enough to do so, and dragging a Flickable with the mouse is unintuitive (since most UIs don't allow it and most mice have wheels), selectByMouse now defaults to true, and has the stricter meaning that its name implies. To select text on a touchscreen, the end-user needs to rely on text-selection handles, which are provided on touch-centric mobile platforms, and could also be implemented from scratch if someone builds a custom text field using TextInput. [ChangeLog][QtQuick][TextInput] The selectByMouse property is now enabled by default, but no longer enables selecting by dragging your finger across text on a touchscreen. Platforms that are optimized for touchscreens normally use special text-selection handles, which interact with Qt via QInputMethod. You can opt out of the behavior change by using an import version < 6.4. [ChangeLog][Controls][TextField] The selectByMouse property is now enabled by default, but no longer enables selecting by dragging your finger across text on a touchscreen. Platforms that are optimized for touchscreens normally use special text-selection handles, which interact with Qt via QInputMethod. You can opt out of the behavior change by using an import version < 6.4. Pick-to: 6.4 Task-number: QTBUG-10684 Task-number: QTBUG-38934 Task-number: QTBUG-101205 Change-Id: I6d3158dd48896a0bed37cbc0b2da01d313a499f8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quicktestutils/quick/visualtestutils.cpp')
0 files changed, 0 insertions, 0 deletions