summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <[email protected]>2020-10-16 10:12:36 +0200
committerShawn Rutledge <[email protected]>2020-10-20 09:17:35 +0200
commit5683c0afdaf942e81ba614bd44eda0cc59d0d7a1 (patch)
treeb2930368d8dc838d4efc9bb4ee9a4021da73b7b1 /src/gui/kernel/qevent.cpp
parent6089888d1d6c2b6ab6b8b788ccec951b58292cd8 (diff)
Add QSinglePointEvent::exclusivePointGrabber convenience property
Since a single-point event (such as a QMouseEvent) only carries one point, it only has one grabber, so we can have a normal Q_PROPERTY. It's named exclusivePointGrabber to avoid shadowing the QPointerEvent::[set]exclusiveGrabber functions that take QEventPoint&. Change-Id: Ie18f1c1849ed057b98f229de7b17b7fc3f3eea36 Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r--src/gui/kernel/qevent.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 5a539ccaf66..51100f56ffd 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -964,6 +964,21 @@ bool QSinglePointEvent::isEndEvent() const
}
/*!
+ \property QSinglePointEvent::exclusivePointGrabber
+ \brief the object that will receive future updates
+
+ The exclusive grabber is an object that has chosen to receive all future
+ update events and the release event containing the same point that this
+ event carries.
+
+ Setting the exclusivePointGrabber property is a convenience equivalent to:
+ \code
+ setExclusiveGrabber(points().first(), exclusiveGrabber);
+ \endcode
+*/
+
+
+/*!
\class QMouseEvent
\ingroup events
\inmodule QtGui