aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-05-26 10:31:58 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-05-26 12:53:25 +0200
commit36f75c0a1b0145b50f24db397a641c1760cb351a (patch)
treeb1c5c433da4ab224adb13cef251c08b5bdf4c89e
parentbebb3afa1ced4656a021a55199ee60debe15e1ae (diff)
docs: Clarify EventPoint properties
- pointId is the point ID, obviously. - Users should not set the accepted flag in QML. It's not possible to make this mechanism useful in Qt 6. In Qt 5, there's no pressed(EventPoint) signal; setting it in onTapped() doesn't have the desired effect; and setting it procedurally in any context is an ugly MouseArea hack that we'd better avoid repeating. It was already marked readonly, but the docs mistakenly suggested that it should be settable. The Q_PROPERTY is writable, but probably shouldn't be. Amends a4439d6baf6996fd018575f5ed752b4d4429f92a Fixes: QTBUG-94016 Pick-to: 5.12 Change-Id: I9ee23e8fd4d4417638c520425882b83c26588526 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--src/quick/items/qquickevents.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index 0f5f32a213..3ac8e19e9c 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -813,7 +813,7 @@ QQuickPointerDevice *QQuickPointerDevice::tabletDevice(const QTabletEvent *event
\readonly
\qmlproperty int QtQuick::EventPoint::pointId
- This property holds the ID of the event, if any.
+ This property holds the ID of the point, if any.
Touchpoints have automatically-incrementing IDs: each time the user
presses a finger against the touchscreen, it will be a larger number.
@@ -826,12 +826,8 @@ QQuickPointerDevice *QQuickPointerDevice::tabletDevice(const QTabletEvent *event
\readonly
\qmlproperty bool QtQuick::EventPoint::accepted
- Setting \a accepted to true prevents the event from being propagated to
- Items below the PointerHandler's Item.
-
- Generally, if the handler acts on the mouse event, then it should be
- accepted so that items lower in the stacking order do not also respond to
- the same event.
+ Indicates whether this point has been accepted during delivery thus far.
+ This flag cannot be usefully set from QML.
*/
/*!