Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Zoom in/out based on mouse position.

    General and Desktop
    2
    5
    1217
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • c.savur
      c.savur last edited by

      Hello Everyone,

      I have a problem with QGraphicsview framework. It is about Zoom in/out.
      When I set the graphics view to

      setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
      

      It does work correctly when the image is cover all the screen (hight and width close to each other). up to here is OK.

      The problem starts when the width is too large. This time, when I try to zoom in/out, the mouse does not stay on same position based on background image until image covers the all the scenerect. Then it stays in the same location.

      Any suggestion?

      Thank you.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Sounds strange, which version of Qt are you using ? On which platform ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        c.savur 1 Reply Last reply Reply Quote 0
        • c.savur
          c.savur @SGaist last edited by

          @SGaist

          Hi,

          Qt 5.5 on CentOS 7 x64.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Can you test against a more recent version of Qt ? 5.6 or 5.7 RC ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            c.savur 1 Reply Last reply Reply Quote 0
            • c.savur
              c.savur @SGaist last edited by

              @SGaist

              I recompiled with Qt 5.6 but still have the same problem. I am not able to compile with 5.7 at this moment.

              Do you have any ques why it is happening?

              1 Reply Last reply Reply Quote 0
              • First post
                Last post