[Qt-interest] how to discard mousePressEvent in mouseDoubleClickEvent
Yifei Li
yifli at mtu.edu
Tue Apr 21 16:35:31 CEST 2009
Girish,
My program allows users to create and modify Bezier curves. Users can
add new control points by single clicks, and a double click indicates
the point being added is the last one.
So if I understand you correctly, there's no function call like
'disableEvent(mousePressEvent)'?
Thanks
Yifei
Girish Ramakrishnan wrote:
> 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