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

Rujia Liu rujia.liu at gmail.com
Wed Sep 18 02:18:42 UTC 2013


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.


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

> Rujia Liu <rujia.liu at gmail.com> writes:
>
> > Hi!
> >
> > I want to implement a AutoCAD-like zoom in/out behavior and found this:
> >
> >
> http://www.qtcentre.org/threads/35738-How-to-zooming-like-in-AutoCAD-with-QGraphicsView
> >
> > I tried to use scale+centerOn (also in wheel event) but it doesn't work.
> It
> > is scaled properly but does NOT center on the given point. Is there any
> > workaround?
> That got to be a qt problem, unless something specific doesn't
> work. You'll need to paste the code to diagnose it further.
>
> --
> With best regards, Stas.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/commonqt-devel/attachments/20130918/b9f2a995/attachment.html>


More information about the commonqt-devel mailing list