summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2013-03-25 18:09:54 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-26 07:27:26 +0100
commitc5323959d76970e26aa288a6b2ccf2b6eb73e26d (patch)
treef746dd9fd69347b3ab93f3c0b1c9848f5fb210ba /src/widgets
parent470f92167f64b4cc39fa43952829ed10d028986b (diff)
Set screen position when generating synthetic mouse events from touch
QGraphicsView uses QMouseEvent::globalPos(), so we need to set it when synthesizing mouse events in QApplication. Change-Id: I8341e09fdd41400c5c5e1d0ee17c7323efdafaeb Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qapplication.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index eda6751082..22133214df 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -3788,7 +3788,7 @@ bool QApplicationPrivate::translateTouchToMouse(QWidget *widget, QTouchEvent *ev
const QPoint pos = widget->mapFromGlobal(p.screenPos().toPoint());
- QMouseEvent mouseEvent(eventType, pos,
+ QMouseEvent mouseEvent(eventType, pos, p.screenPos().toPoint(),
Qt::LeftButton, Qt::LeftButton,
event->modifiers());
mouseEvent.setAccepted(true);