I have some code that captures mousePressEvents, mouseReleaseEvents, mouseMoveEvents, and mouseDoubleClickEvents for a QGLWidget. I have it do many things based on which of the events occur. Inside my mouseReleaseEvent I have some code that is to only be executed if a double click did not occur. But when I would double click I noticed I was entering the release code.

I set up some break points and noticed on a double click the order of events is:

1. mousePressEvent
2. mouseReleaseEvent
3. mouseDoubleClickEvent
4. mouseReleaseEvent

Is there a way to tell if there is a double click event in the queue of mouse events because I would prefer to enter the double click event code first and then check the release event code and completely ignore the press event code if I double click. I am using Qt 3.3.7. Thanks for your help!