I need to do this for configuring my application. I have QLineEdit field with reimplemented keyPressEvent method.
QKeyEvent *ke = ... QString txt; if(ke->
simpliest way is:
if(event->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast(event); qDebug() << "delete" << keyEvent->matches(QKeySequence::Delete); qDebug() << "copy" << keyEvent->matches(QKeySequence::Copy); qDebug() << "paste" << keyEvent->matches(QKeySequence::Paste); }