diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp index 3a0b1e0f215..14d059abc11 100644 --- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp +++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp @@ -33,7 +33,7 @@ #include #include -TabletWidget::TabletWidget(bool mouseToo) : mMouseToo(mouseToo), mWheelEventCount(0) +TabletWidget::TabletWidget(bool mouseToo) : mMouseToo(mouseToo), mWheelEventCount(0), mQuitShortcut(QKeySequence::Quit, this) { QPalette newPalette = palette(); newPalette.setColor(QPalette::Window, Qt::white); @@ -41,6 +41,7 @@ TabletWidget::TabletWidget(bool mouseToo) : mMouseToo(mouseToo), mWheelEventCoun setPalette(newPalette); qApp->installEventFilter(this); resetAttributes(); + connect(&mQuitShortcut, SIGNAL(activated()), qApp, SLOT(quit())); } bool TabletWidget::eventFilter(QObject *, QEvent *ev) diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.h b/tests/manual/qtabletevent/device_information/tabletwidget.h index 0d27c2eea01..404be1289f0 100644 --- a/tests/manual/qtabletevent/device_information/tabletwidget.h +++ b/tests/manual/qtabletevent/device_information/tabletwidget.h @@ -31,6 +31,7 @@ #include #include +#include // a widget showing the information of the last tablet event class TabletWidget : public QWidget @@ -64,6 +65,7 @@ private: bool mMouseToo; ulong mTimestamp; int mWheelEventCount; + QShortcut mQuitShortcut; }; #endif // TABLETWIDGET_H