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. Record a mouse movement
QtWS25 Last Chance

Record a mouse movement

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 2.1k 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.
  • R Offline
    R Offline
    romeo.rbw
    wrote on last edited by
    #1

    Hi...
    Is there a good method to record a cursor movement?. After recording it will be used to select an object that is circled by that movement.
    Thanks
    Regards,
    romeo

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      An immediate solution that comes into mind is to push points into a QPolygon in the mouseMoveEvent(). You can then use containsPoint() or get the boundingRect() to determine which object has been selected.

      QRubberBand might be another alternative if you are not bound to the circling gesture.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        romeo.rbw
        wrote on last edited by
        #3

        Thank you very much, I will explore more.
        Regards,
        romeo

        1 Reply Last reply
        0
        • B Offline
          B Offline
          butterface
          wrote on last edited by
          #4

          I am not quite sure if this only works with touch screens or if they will be recognised from mouse movement as well but if so you should have a look at "QGesture":http://qt-project.org/doc/qt-4.8/qgesture.html

          1 Reply Last reply
          0
          • R Offline
            R Offline
            romeo.rbw
            wrote on last edited by
            #5

            Dear Qt-ers,
            I already read the help of QGesture, may be this will be the solution, thank you for advice. Is there any other tutorial about QGesture especially creating a custom Gesture?

            Thank you in advance

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sam
              wrote on last edited by
              #6

              You can have a look on "this":http://qt-project.org/forums/viewthread/18613/ thread.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dscyw
                wrote on last edited by
                #7

                QpanGestureˊs delta property maybe helpful."Click here":http://qt-project.org/doc/qt-5/qpangesture.html

                1 Reply Last reply
                0

                • Login

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