summaryrefslogtreecommitdiffstats
path: root/examples/quick/controls/texteditor/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/controls/texteditor/src')
-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);