Tag Archives: release

Simulate a Key event press/release in QT 4

QApplication::sendEvent(this, new QKeyEvent (QEvent::KeyPress, Qt::Key_Dead_Diaeresis, Qt::NoModifier, QString("ยจ")));   //Another way I guess easy to understand :) //Although both are same QKeyEvent keyEvent(QEvent::KeyPress,Qt::Key_Escape, Qt::NoModifier); QApplication::sendEvent(this, &keyEvent);

Posted in Featured, Qt Tagged , , , ,