Hi,
documentation of RActionAdapter states:
virtual void escapeEvent ()
Escape events are triggered if the user clicks the right mouse button or hits the Escape key.
implementing escapeEvent in an action works fine - it is called when user hits escape key.
However, my function is not called when user clicks the right mouse button....
observed in 3.8.1 win and linux
also in 3.9.1 win (linux version still comiling QCad sources ...)
Any hints?
Thanks and regards,
Ulrich
RActionAdapter::escapeEvent not called on right mouse button
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: RActionAdapter::escapeEvent not called on right mouse bu
This functionality is actually implemented in EAction:
EAction.prototype.mouseReleaseEvent = function(event) { if (event.button() === Qt.RightButton) { this.escapeEvent(); } };If your action is implemented in ECMAScript and derived from EAction, escapeEvent should be triggered, otherwise you can provide your own similar implementation of mouseReleaseEvent.
Re: RActionAdapter::escapeEvent not called on right mouse bu
Hi Andrew,
thanks a lot ! Implementing myAction::mouseReleaseEvent did the trick.
Regards,
Ulrich
thanks a lot ! Implementing myAction::mouseReleaseEvent did the trick.
Regards,
Ulrich