summaryrefslogtreecommitdiffstats
path: root/tests/manual/qtabletevent/device_information/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/qtabletevent/device_information/main.cpp')
-rw-r--r--tests/manual/qtabletevent/device_information/main.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/manual/qtabletevent/device_information/main.cpp b/tests/manual/qtabletevent/device_information/main.cpp
index 54f9f5cb54..1c83023cee 100644
--- a/tests/manual/qtabletevent/device_information/main.cpp
+++ b/tests/manual/qtabletevent/device_information/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the test suite of the Qt Toolkit.
@@ -40,11 +40,21 @@
****************************************************************************/
#include <QApplication>
+#include <QDebug>
#include "tabletwidget.h"
int main(int argc, char **argv) {
- QApplication app(argc, argv);
- TabletWidget tabletWidget;
- tabletWidget.showMaximized();
- return app.exec();
+ QApplication app(argc, argv);
+ bool mouseToo = false;
+ if (app.arguments().contains(QLatin1String("--nomouse")) || app.arguments().contains(QLatin1String("-nomouse")))
+ mouseToo = false;
+ else if (app.arguments().contains(QLatin1String("--mouse")) || app.arguments().contains(QLatin1String("-mouse")))
+ mouseToo = true;
+ if (mouseToo)
+ qDebug() << "will show mouse events coming from the tablet as well as QTabletEvents";
+ else
+ qDebug() << "will not show mouse events from the tablet; use the --mouse option to enable";
+ TabletWidget tabletWidget(mouseToo);
+ tabletWidget.showMaximized();
+ return app.exec();
}