Mimicking/faking a Mouse Click and Mouse Wheel using Qt?

If you want to simulate clicks on widgets inside your application, check out QTestEventList.

Up vote 2 down vote favorite 1 share g+ share fb share tw.

To be more specific, I want to click inside and outside the Qt application. Thanks in advance! Qt events mouse wheel pseudo link|improve this question edited Jan 5 '10 at 9:04 asked Jan 5 '10 at 4:59Viet2,64552663 88% accept rate.

If you want to simulate clicks on widgets inside your application, check out QTestEventList: A QTestEventList can be populated with GUI events that can be stored as test data for later usage, or be replayed on any QWidget. It lets you perform keypresses and various mouse events, but no wheel. Regardless, the source code should give cues on best practices for this sort of operation: qt.gitorious.org/qt/qt/blobs/master/src/... qt.gitorious.org/qt/qt/blobs/master/src/... OTOH, if you mean you want to simulate clicks outside your application (like icons on the desktop etc.) that's probably beyond the scope of the Qt API.

To "take complete control over the mouse" on Windows there's this related question: http://stackoverflow.com/questions/1740045/simulating-a-mouse-button-click-in-windows ...and might instead consider using an automation tool specifically designed for this task. Some options are the Windows Auto It! , the Mac's Automator, and the Web-based iMacros.

You could even invoke such a tool from Qt as a QProcess.

1 thanks Hostile Fork! I want to click outside application actually. – Viet Jan 5 '10 at 9:04 1 If you want to stimulate outside the app in an X11 environment, you can use Xnee: gnu.org/software/xnee .

– e8johan Jan 5 '10 at 12:24 +1 thanks. I'm not an expert of X11. – Viet Jan 6 '10 at 3:49.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions