bool Widget::eventFilter(QObject *target, QEvent *event)
{
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->modifiers() == Qt::ControlModifier) {
if (keyEvent->key() == Qt::Key_Tab) {
qDebug() << "Handling..";
return true;
}
return false;
}
}
bool Widget::eventFilter(QObject *target, QEvent *event)
{
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->modifiers() == Qt::ControlModifier) {
if (keyEvent->key() == Qt::Key_Tab) {
qDebug() << "Handling..";
return true;
}
return false;
}
}
To copy to clipboard, switch view to plain text mode
then I see that this handler called two time:
ApplicationOutput:
Handling..
Handling..
Bookmarks