When I build our application against Qt 5.1.0 (qmake version 3.0) a 
double-click results in the following sequence of events:

mousePressEvent()
mouseReleaseEvent()
mousePressEvent()
mouseDoubleClickEvent()
mouseReleaseEvent()

The same application built against Qt 4.8.2 gives this sequence:

mousePressEvent()
mouseReleaseEvent()
mouseDoubleClickEvent()
mouseReleaseEvent()

Note that the second mousePressEvent is not there. I see this difference on 
both Macintosh and Windows.

The Qt 5 behavior makes it difficult to handle a double-click event. I am aware 
that you have to expect a mousePressEvent plus the mouseDoubleClickEvent, but I 
don't expect two mousePressEvents.

So my questions:

1) Is this the expected behavior for Qt5?

2) If it is by design, rather than a bug, how is my code supposed to know that 
the second mousePressEvent is actually the second click of a mouseDoubleClick 
event?

Thank you for any insight!

-John Weeks

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to