Servus Robert, QGuiApplication::processMouseEvent() consumes the second mouse press event and sends an additional QEvent::Type::MouseButtonDblClick if the time between two presses is within the double click interval (QGuiApplication::styleHints()->mouseDoubleClickInterval()).
That said, when the second press event is received, Qt doesn't know if it meets the criteria for a double click. The second press event has been sent for as long as I remember. That is, according to git blame, at least since 2017 ;-) Cheers Axel Confidential ________________________________ From: Interest <interest-boun...@qt-project.org> on behalf of Schimkowitsch Robert <robert.schimkowit...@andritz.com> Sent: Wednesday, 3 September 2025 11:43 To: interest@qt-project.org <interest@qt-project.org> Subject: Re: [Interest] Sequence of events in a double click A small correction: “ButtonDoubleRelease” does not exist. It should read “ButtonRelease” From: Interest <interest-boun...@qt-project.org> On Behalf Of Schimkowitsch Robert Sent: Wednesday, 3 September 2025 11:21 To: interest@qt-project.org Subject: [Interest] Sequence of events in a double click CAUTION: External email. Do not click on links or open attachments unless you know the sender and that the content is safe. Hi all, when you perform a double click on a mouse button (=pressing and releasing the mouse button in fast sequence twice), I have, over many years, always expected this sequence: ButtonPress ButtonRelease ButtonDoublePress ButtonDoubleRelease It is consistent with what I get when I trace the window events using Spy++ (on Windows, for context) on a simple application (not my own, since Spy++ crashes when encountering the hooks of a serious Qt application, and I currently don’t have a good replacement tool). However, in my Qt 6.8.2 application using a window event filter, I receive the following sequence: ButtonPress ButtonRelease ButtonPress ButtonDoublePress ButtonDoubleRelease The extra press confuses me. Is this as it should be? Kind regards Robert ________________________________ This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system. ANDRITZ HYDRO GmbH Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation Firmensitz/ Registered seat: Wien Firmenbuchgericht/ Court of registry: Handelsgericht Wien Firmenbuchnummer/ Company registration: FN 61833 g DVR: 0605077 UID-Nr.: ATU14756806 Thank You ________________________________ ________________________________ This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system. ANDRITZ HYDRO GmbH Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation Firmensitz/ Registered seat: Wien Firmenbuchgericht/ Court of registry: Handelsgericht Wien Firmenbuchnummer/ Company registration: FN 61833 g DVR: 0605077 UID-Nr.: ATU14756806 Thank You ________________________________
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest