I would like to start making a gaming bot with QT.

I was wondering if anyone is kind enough to point me into some relevent examples or code chunks or classes?

Eg. A program that runs in the background. Sending keyboard and mouse changes to another program (preferably just global changes?).

Also receiving mouse and keyboard changes as used in the game program (for recording etc).

Also monitoring graphics, screen grabs, looking for changes etc.

I currently only play the game in Windows.

Thanks in advance