I TRIED WITH THIS CODE
{
if (event
->type
() == QEvent::KeyPress) { QKeyEvent *keyEvent
= static_cast<QKeyEvent
*>
(event
);
if (keyEvent->key() == Qt::Key_Escape) {
keyEvent->ignore();
// Special tab handling
return true;
} else
return false;
}
return false;
}
bool QDialog::eventFilter(QObject *object, QEvent *event)
{
if (event->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
if (keyEvent->key() == Qt::Key_Escape) {
keyEvent->ignore();
// Special tab handling
return true;
} else
return false;
}
return false;
}
To copy to clipboard, switch view to plain text mode
BUT , THE CONDITION
if (event
->type
() == QEvent::KeyPress)
if (event->type() == QEvent::KeyPress)
To copy to clipboard, switch view to plain text mode
FAILS FOR Esc KEYY PRESS\
Bookmarks