Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
How to emulate a mouse?
romeo.rbw last edited by
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.
MuldeR last edited by
I'm not quite sure what you are trying to do, but QTest can emulate user input (like Mouse).