Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-60672

QGraphicsView::setTransformationAnchor(AnchorUnderMouse) does not work with setInteractive(false)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.2, 5.6.3, 5.12.0
    • Widgets: GraphicsView
    • None

    Description

      Checking qgraphicsview.cpp you can notice that lastMouseMoveScenePoint, used as anchor, is not updated during mouse move events if scene Interaction is disabled.

      void QGraphicsViewPrivate::mouseMoveEventHandler(QMouseEvent *event){
      ...
      if (!sceneInteractionAllowed) return;
      ...
      lastMouseMoveScenePoint = mouseEvent.scenePos();
      ...
      }
      

      In my opinion, disabling scene interaction should not affect view functionality. I think it can be easily fixed moving the assignment before the "if".

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            ahi Adriel Jr.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes