Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get direction of mouse movement
QtWS25 Last Chance

Get direction of mouse movement

Scheduled Pinned Locked Moved Solved General and Desktop
qt5.13.1c++mouse events
3 Posts 2 Posters 439 Views
  • 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.
  • S Offline
    S Offline
    ScleaverZer0ne
    wrote on 2 Aug 2023, 05:43 last edited by
    #1

    Is there a way to determine which direction the mouse has been moved inside a mouseMoveEvent?

    I want to be able change the value of scroll bar on the basis of mouse movement.

    J 1 Reply Last reply 2 Aug 2023, 05:51
    0
    • S ScleaverZer0ne
      2 Aug 2023, 05:43

      Is there a way to determine which direction the mouse has been moved inside a mouseMoveEvent?

      I want to be able change the value of scroll bar on the basis of mouse movement.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 2 Aug 2023, 05:51 last edited by
      #2

      @ScleaverZer0ne You can always remember the previous mouse cursor position(s) and then compare with the new one to determine the movement direction.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply 2 Aug 2023, 05:53
      5
      • J jsulm
        2 Aug 2023, 05:51

        @ScleaverZer0ne You can always remember the previous mouse cursor position(s) and then compare with the new one to determine the movement direction.

        S Offline
        S Offline
        ScleaverZer0ne
        wrote on 2 Aug 2023, 05:53 last edited by
        #3

        @jsulm I just thought of that a moment ago and came here to edit the post and read your answer lol. Thanks tho!

        1 Reply Last reply
        1
        • S ScleaverZer0ne has marked this topic as solved on 2 Aug 2023, 05:53

        1/3

        2 Aug 2023, 05:43

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved