diff --git a/src/tabbox/tabbox.cpp b/src/tabbox/tabbox.cpp index 3aeb9ea563..e547f972f7 100644 --- a/src/tabbox/tabbox.cpp +++ b/src/tabbox/tabbox.cpp @@ -1437,8 +1437,8 @@ void TabBox::keyPress(int keyQt) // if Escape is part of the shortcut, don't cancel close(true); } else if (direction == Steady) { - QKeyEvent *event = new QKeyEvent(QEvent::KeyPress, keyQt & ~Qt::KeyboardModifierMask, Qt::NoModifier); - grabbedKeyEvent(event); + QKeyEvent event(QEvent::KeyPress, keyQt & ~Qt::KeyboardModifierMask, Qt::NoModifier); + grabbedKeyEvent(&event); } } }