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.
↧