Hello,

i want set and click the cursor outside from my Application (e.k. a game in windowsmode or a word dokument).

I have tested
Qt Code:
  1. QCursor::setPos(10,10);
To copy to clipboard, switch view to plain text mode 
to set my Mouseposition. Its work, the mousposition are outside on my widget and application(my application is only 1 px big).
but the click doesnt work

I have use/testing
Qt Code:
  1. #include <Windows.h>
  2. ...
  3. mouse_event(MOUSEEVENTF_LEFTDOWN,0, 0, 0,0);
  4. mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0,0);
To copy to clipboard, switch view to plain text mode 
or

Qt Code:
  1. CONFIG += qtestlib
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #include <QtTest/QTest>
  2. ...
  3. QTestEventList *eventList=new QTestEventList();
  4. eventList->addDelay(2000);
  5. eventList->addMouseMove(QPoint(15,35));
  6. eventList->addMouseClick(Qt::LeftButton,Qt::NoModifier,QPoint(15,35));
  7. eventList->simulate(this);
To copy to clipboard, switch view to plain text mode 

but nothing work

Idont know what i can do.... can someone help me please ?