summaryrefslogtreecommitdiffstats
path: root/examples/quick/controls/texteditor/src/main.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-10-17 16:58:11 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-17 19:45:05 +0200
commit771e2babf6d201f7f6a11c93a59c152896dad8db (patch)
tree5b83b8546f624f2b7c77f04020cc5309362bfed9 /examples/quick/controls/texteditor/src/main.cpp
parent0bf5b80baee78f9fc7145304821481556ccba78b (diff)
Remove widget dependency on touch platforms
We don't want native styling on touch enabled devices and there is no reason to link against widgets there. Change-Id: I70116a0a94227cb58ae25980b97c4177da75a3c8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'examples/quick/controls/texteditor/src/main.cpp')
-rw-r--r--examples/quick/controls/texteditor/src/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/quick/controls/texteditor/src/main.cpp b/examples/quick/controls/texteditor/src/main.cpp
index 8d2b8dd07..a096f70d1 100644
--- a/examples/quick/controls/texteditor/src/main.cpp
+++ b/examples/quick/controls/texteditor/src/main.cpp
@@ -38,8 +38,11 @@
**
****************************************************************************/
-
+#ifdef QT_WIDGETS_LIB
#include <QtWidgets/QApplication>
+#else
+#include <QtGui/QGuiApplication>
+#endif
#include <QtQml>
#include <QtQuick/QQuickView>
#include <QtCore/QString>
@@ -48,7 +51,11 @@
int main(int argc, char *argv[])
{
+#ifdef QT_WIDGETS_LIB
QApplication app(argc, argv);
+#else
+ QGuiApplication app(argc, argv);
+#endif
qmlRegisterType<DocumentHandler>("org.qtproject.example", 1, 0, "DocumentHandler");
QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
QObject *topLevel = engine.rootObjects().value(0);