mirror of https://github.com/procxx/kepka.git
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) {
|
void ScrollArea::keyPressEvent(QKeyEvent *e) {
|
||||||
if ((e->key() == Qt::Key_Up || e->key() == Qt::Key_Down) && e->modifiers().testFlag(Qt::AltModifier)) {
|
if ((e->key() == Qt::Key_Up || e->key() == Qt::Key_Down) && e->modifiers().testFlag(Qt::AltModifier)) {
|
||||||
e->ignore();
|
e->ignore();
|
||||||
|
} else if(e->key() == Qt::Key_Escape || e->key() == Qt::Key_Back) {
|
||||||
|
((QObject*)widget())->event(e);
|
||||||
} else {
|
} else {
|
||||||
QScrollArea::keyPressEvent(e);
|
QScrollArea::keyPressEvent(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue