Correct the misgenerated localMouseEvent
This commit fixes the issue where some parts of Qt6 widgets couldn't be clicked with a Wacom tablet stylus. 1. QMouseEvent is constructed with incorrect arguments. https://doc.qt.io/qt-6/qmouseevent.html#QMouseEvent-3 The _button_ that caused the event is given as a value from the Qt::MouseButton enum. If the event _type_ is MouseMove, then the appropriate button for this event is Qt::NoButton. _buttons_ is the state of all buttons at the time of the event, _modifiers_ is the state of all keyboard modifiers. 2. Some parts of Qt widgets require a timestamp to function properly. https://codereview.qt-project.org/c/qt/qtdeclarative/+/493020 QQuickWidget: give each mapped mouse event the same QEventPoint. Counter-intuitively, this is done by setting the timestamp. Every time you construct a new mouse event, you always need to call setTimestamp() for the obvious reason: the timestamp is not a ctor argument, but it's important for some event receivers. But...
Please register or sign in to comment