[Qt-interest] how to discard mousePressEvent in mouseDoubleClickEvent
Girish Ramakrishnan
girish at forwardbias.in
Tue Apr 21 06:15:52 CEST 2009
Yifei Li wrote:
> Hi all,
>
> According to the document, widgets get a mousePressEvent and
> mouseReleaseEvent before mouseDoubleClickEvent.
>
> I'm wondering if it's possible to discard
> mousePressEvent/mouseReleaseEvent in mouseDoubleClickEvent?
>
Nope, it's too late to discard them since they have already been
delivered by the time mouseDoubleClickEvent() is called. In general, a
widget that processes double clicks ignores single clicks, so there is
really no need to process mousePress/release in the first place. What
exactly is the problem you are trying to solve?
Girish
More information about the Qt-interest-old
mailing list