Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7
Description
QMouseEvent e(QEvent::MouseButtonPress, QPointF(10, 10), QPointF(40, 50), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); Q_ASSERT(e.globalPosition() == QPointF(40, 50)); QMouseEvent ee(e.type(), QPointF(10, 10), e.pos(), e.button(), e.buttons(), e.modifiers()); Q_ASSERT(e.globalPosition() == QPointF(40, 50));
The following code doesn't work as expected. The global position in "e" changes after creating "ee".
I've attached a demo app that demonstrates the issue. The expected behavior is that the global position in the first mouse event remains unchanged after creating the second event.