mirror of https://github.com/procxx/kepka.git
Merge pull request #2209 from splintor/master
Pass Escape key to internal widget of ScrollArea
This commit is contained in:
commit
5eb49c9d68
Telegram/SourceFiles/ui
|
@ -651,6 +651,8 @@ void ScrollArea::moveEvent(QMoveEvent *e) {
|
|||
void ScrollArea::keyPressEvent(QKeyEvent *e) {
|
||||
if ((e->key() == Qt::Key_Up || e->key() == Qt::Key_Down) && e->modifiers().testFlag(Qt::AltModifier)) {
|
||||
e->ignore();
|
||||
} else if(e->key() == Qt::Key_Escape || e->key() == Qt::Key_Back) {
|
||||
((QObject*)widget())->event(e);
|
||||
} else {
|
||||
QScrollArea::keyPressEvent(e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue