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>
This commit is contained in:
parent
470f92167f
commit
c5323959d7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user