diff options
-rw-r--r-- | src/plugins/welcome/introductionwidget.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/plugins/welcome/introductionwidget.cpp b/src/plugins/welcome/introductionwidget.cpp index d0c993b6e8..d10cb76be2 100644 --- a/src/plugins/welcome/introductionwidget.cpp +++ b/src/plugins/welcome/introductionwidget.cpp @@ -31,6 +31,7 @@ #include <utils/stylehelper.h> #include <QEvent> +#include <QGuiApplication> #include <QKeyEvent> #include <QLabel> #include <QPainter> @@ -349,8 +350,17 @@ void IntroductionWidget::keyPressEvent(QKeyEvent *ke) { if (ke->key() == Qt::Key_Escape) finish(); - else if (ke->modifiers() == Qt::NoModifier) - step(); + else if ((ke->modifiers() + & (Qt::ControlModifier | Qt::AltModifier | Qt::ShiftModifier | Qt::MetaModifier)) + == Qt::NoModifier) { + const Qt::Key backKey = QGuiApplication::isLeftToRight() ? Qt::Key_Left : Qt::Key_Right; + if (ke->key() == backKey) { + if (m_step > 0) + setStep(m_step - 1); + } else { + step(); + } + } } void IntroductionWidget::mouseReleaseEvent(QMouseEvent *me) |