How to emulate a mouse?
General and Desktop
3
Posts
3
Posters
1.6k
Views
1
Watching
-
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. -
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.