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
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
#include <Windows.h>
...
mouse_event(MOUSEEVENTF_LEFTDOWN,0, 0, 0,0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0,0);
#include <Windows.h>
...
mouse_event(MOUSEEVENTF_LEFTDOWN,0, 0, 0,0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0,0);
To copy to clipboard, switch view to plain text mode
or
CONFIG += qtestlib
CONFIG += qtestlib
To copy to clipboard, switch view to plain text mode
#include <QtTest/QTest>
...
eventList->addDelay(2000);
eventList
->addMouseMove
(QPoint(15,
35));
eventList
->addMouseClick
(Qt
::LeftButton,Qt
::NoModifier,
QPoint(15,
35));
eventList->simulate(this);
#include <QtTest/QTest>
...
QTestEventList *eventList=new QTestEventList();
eventList->addDelay(2000);
eventList->addMouseMove(QPoint(15,35));
eventList->addMouseClick(Qt::LeftButton,Qt::NoModifier,QPoint(15,35));
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 ?
Bookmarks