[commonqt-devel] Zoom in/out QGraphicsView centering on mouse position

Rujia Liu rujia.liu at gmail.com
Wed Sep 18 03:44:16 UTC 2013


Problem Solved. My old code only overrides QGraphicsScene's wheel event,
but the default QGraphicsView's wheel event moved the scroll bar before
calling the QGraphicsScene's wheel events, so the behavior messed up :-/

Now I overrided QGraphicsView's wheel event and did not call
(call-next-qmethod event), now it works perfectly!!!


On Wed, Sep 18, 2013 at 10:21 AM, Stas Boukarev <stassats at gmail.com> wrote:

> Rujia Liu <rujia.liu at gmail.com> writes:
>
> > Ok! I'll look into it soon and will paste some code if I still haven't
> get
> > it right.
> >
> > BTW: is it possible to add a mouse event handler without subclassing and
> > override the event handler? sometimes it'll be cleaner.
> Nope, not possible currently.
>
> --
> With best regards, Stas.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/commonqt-devel/attachments/20130918/12c172f1/attachment.html>


More information about the commonqt-devel mailing list