mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-15 19:55:18 +00:00
Pass Escape key to internal widget of ScrollArea
Fix for https://github.com/telegramdesktop/tdesktop/issues/2208 Signed-off-by: Shmulik Flint <splintor@gmail.com>
This commit is contained in:
parent
da293755ef
commit
87bb221cc3
@ -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
Block a user