-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
5.3.2, 5.4.0
-
None
-
OS X 10.10 and 10.9
- Compile and run the code below
#include <QWidget>
#include <QApplication>
#include <QDebug>
#include <QMouseEvent>
class W : public QWidget
{
void mousePressEvent(QMouseEvent* e)
{
qDebug()<<"mousePressEvent"<<e;
}
void mouseMoveEvent(QMouseEvent* e)
{
qDebug()<<"mouseMove"<<e;
}
void mouseReleaseEvent(QMouseEvent* e)
{
qDebug()<<"mouseReleaseEvent"<<e;
}
};
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
W w;
w.show();
return a.exec();
}
- press and drag the mouse around. "mouseMove" is printed continuously.
When you move over the titlebar you will start receiving a stream of mousePressEvent-s instead!
The bug is surprisingly evil in real life because it breaks almost all mouse interaction which required dragging - content dragging (navigating), widgets dragging ("sliders"), Drag-and-Drop - all.
Debugging
Problem is QGuiApplicationPrivate::processMouseEvent receives both
QWindowSystemInterfacePrivate::FrameStrutMouse and QWindowSystemInterfacePrivate::Mouse for the same event!
(The Strut is received second, breaking the normal processing of Mouse, most notably because it's buttons are empty, which triggers a special case in processMouseEvent)
- is replaced by
-
QTBUG-41609 OS X: FrameStrutMouseEvent causes spurious double-clicks
-
- Closed
-