diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-08-18 17:33:29 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-08-26 09:36:20 +0200 |
commit | 1ecf2212fae176b78c9951a37df9e33eb24d4f2d (patch) | |
tree | bd1f06f25f8e034c40d85ca94eec99418d0ec049 /src/widgets/kernel/qapplication_p.h | |
parent | f0c2c987e3e7eb046303892b1eee4f848759923a (diff) |
Forward touchEvents to children inside QGraphicsProxyWidget
Just sending the event to the embedded widget is not enough, we
have to perform hit-testing for the different touch points, and
send the event to the child widget under the point. Fortunately,
QApplicationPrivate::translateRawTouchEvent provides the logic
that generates multiple events for groups of touch points.
Since that helper always sent events spontaneously, add an
optional parameter to allow sending of non-spontaneous events.
Add a test case that simulates touch events to different widget
configurations inside a QGraphicsProxyWidget.
Fixes: QTBUG-67819
Task-number: QTBUG-45737
Pick-to: 6.2 6.1 5.15
Change-Id: Iffd5c84c64ee2ceadc7e31863675fdf227582c81
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets/kernel/qapplication_p.h')
-rw-r--r-- | src/widgets/kernel/qapplication_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index f690b07924..31dde00dd9 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -253,7 +253,8 @@ public: static bool translateRawTouchEvent(QWidget *widget, const QPointingDevice *device, QList<QEventPoint> &touchPoints, - ulong timestamp); + ulong timestamp, + bool spontaneous = true); static void translateTouchCancel(const QPointingDevice *device, ulong timestamp); QPixmap applyQIconStyleHelper(QIcon::Mode mode, const QPixmap& base) const override; |