Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

How to simulate a key sequence?

$
0
0
Hi all, I am trying to simulate a key combination like “Ctrl + Shift + M “ in my application but nothing happens when i call the function that does the job.My function is as follows: void XXXXXXXXX::hideAndSimulateKeyPress()   {      mMainWindow->actionHideApplication->trigger(); //THIS IS MY CODE TO SIMULATE THE COMBINATION .MAY BE THERE IS SOMETHING WRONG...     QTest::keyClick(UBApplication::desktop(), Qt::Key_M,Qt::ControlModifier&Qt::ShiftModifier);       } Thanks for your time.

Viewing all articles
Browse latest Browse all 18427

Trending Articles