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. How to emulate a mouse?
Forum Updated to NodeBB v4.3 + New Features

How to emulate a mouse?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.6k Views 1 Watching
  • 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 method in Qt to emulate a mouse action?
    I will try to make a free hand input using input coordinates. The input is a point but continuesly change. I assume like using a mouse for freehand drawing in paint program but the source coordinates is from my input device. After that I will make a display of that path too. Any suggestion or advice?
    Thank you in advance.

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      If you just want to move the cursor then take a look at QCursor::setPos().
      If you want something more like faking mouse clicks, moves, etc. then you can use QCoreApplication::sendEvent() or QCoreApplication::postEvent() and feed it with your artificial events.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MuldeR
        wrote on last edited by
        #3

        I'm not quite sure what you are trying to do, but QTest can emulate user input (like Mouse).

        My OpenSource software at: http://muldersoft.com/

        Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

        Go visit the coop: http://youtu.be/Jay...

        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