diff options
Diffstat (limited to 'tests/manual/sensor_explorer_qml/main.cpp')
-rw-r--r-- | tests/manual/sensor_explorer_qml/main.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/manual/sensor_explorer_qml/main.cpp b/tests/manual/sensor_explorer_qml/main.cpp new file mode 100644 index 00000000..604a6d36 --- /dev/null +++ b/tests/manual/sensor_explorer_qml/main.cpp @@ -0,0 +1,20 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QtQml> +#include <QtQuick/QQuickWindow> +#include <QtGui/QGuiApplication> + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + QQmlApplicationEngine engine(QUrl("qrc:///sensor_explorer.qml")); + QObject *topLevel = engine.rootObjects().value(0); + QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel); + if (!window) { + qWarning("Error: Your root item has to be a Window."); + return -1; + } + window->show(); + return app.exec(); +} |