summaryrefslogtreecommitdiffstats
path: root/tests/qmldynamicdata/main.cpp
diff options
context:
space:
mode:
authorKeränen Pasi <pasi.keranen@digia.com>2013-11-28 10:42:11 +0200
committerPasi Keränen <pasi.keranen@digia.com>2013-11-29 08:46:52 +0200
commit85dda87df2d420dc53959e549d24c4b09ce93d57 (patch)
treec71d67f0b923d6a3afca1f4604b2ee1d9217202e /tests/qmldynamicdata/main.cpp
parent5c4592ea5bb3a4c98a5fe1846c8b3082bd33e678 (diff)
Dynamic QML data model test.
Task id: QTRD-2645 Change-Id: I115fabf8f997479b47109ce6eb9e568ec80df44e Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'tests/qmldynamicdata/main.cpp')
-rw-r--r--tests/qmldynamicdata/main.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/qmldynamicdata/main.cpp b/tests/qmldynamicdata/main.cpp
new file mode 100644
index 00000000..99e82321
--- /dev/null
+++ b/tests/qmldynamicdata/main.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+#include <QtGui/QGuiApplication>
+#include "qtquick2applicationviewer.h"
+#ifdef Q_OS_ANDROID
+#include <QDir>
+#include <QQmlEngine>
+#endif
+#include <QDebug>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QtQuick2ApplicationViewer viewer;
+#ifdef Q_OS_ANDROID
+ viewer.addImportPath(QString::fromLatin1("assets:/qml"));
+ viewer.engine()->addPluginPath(QString::fromLatin1("%1/../%2").arg(QDir::homePath(),
+ QString::fromLatin1("lib")));
+#endif
+ viewer.setTitle(QStringLiteral("QML Dynamic Data Test"));
+
+ viewer.setSource(QUrl("qrc:/qml/main.qml"));
+ viewer.setResizeMode(QQuickView::SizeRootObjectToView);
+ viewer.show();
+
+ return app.exec();
+}