summaryrefslogtreecommitdiffstats
path: root/examples/qmlbarchart/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qmlbarchart/main.cpp')
-rw-r--r--examples/qmlbarchart/main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/qmlbarchart/main.cpp b/examples/qmlbarchart/main.cpp
index d813443e..b58e66f8 100644
--- a/examples/qmlbarchart/main.cpp
+++ b/examples/qmlbarchart/main.cpp
@@ -6,26 +6,27 @@
**
** This file is part of the QtDataVis3D module.
**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
+** 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
-** $QT_END_LICENSE$
**
****************************************************************************/
#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);
- qDebug() << "Hello world.";
QtQuick2ApplicationViewer viewer;
#ifdef Q_OS_ANDROID
@@ -36,7 +37,7 @@ int main(int argc, char *argv[])
viewer.addImportPath(QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(),
QString::fromLatin1("qml")));
#endif
- viewer.setMainQmlFile(QStringLiteral("qml/qmlbarchart/main.qml"));
+ viewer.setSource(QUrl("qrc:/qml/main.qml"));
viewer.setResizeMode(QQuickView::SizeRootObjectToView);
viewer.show();