summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qevent.cpp10
-rw-r--r--src/gui/kernel/qevent.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 51100f56ff..5938942399 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -684,6 +684,16 @@ bool QPointerEvent::allPointsAccepted() const
}
/*!
+ \reimp
+*/
+void QPointerEvent::setAccepted(bool accepted)
+{
+ QEvent::setAccepted(accepted);
+ for (auto &p : m_points)
+ p.setAccepted(accepted);
+}
+
+/*!
Returns the source device from which this event originates.
This is the same as QInputEvent::device() but typecast for convenience.
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 07d5be51c6..fe728bc40c 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -220,6 +220,7 @@ public:
virtual bool isUpdateEvent() const { return false; }
virtual bool isEndEvent() const { return false; }
bool allPointsAccepted() const;
+ virtual void setAccepted(bool accepted) override;
QObject *exclusiveGrabber(const QEventPoint &point) const;
void setExclusiveGrabber(const QEventPoint &point, QObject *exclusiveGrabber);
QList<QPointer <QObject>> passiveGrabbers(const QEventPoint &point) const;