| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #include <Qt3DQuickExtras/qt3dquickwindow.h> |
| 5 | #include <Qt3DQuick/QQmlAspectEngine> |
| 6 | #include <QQmlEngine> |
| 7 | #include <QQmlContext> |
| 8 | #include <QGuiApplication> |
| 9 | |
| 10 | int main(int argc, char *argv[]) |
| 11 | { |
| 12 | QGuiApplication app(argc, argv); |
| 13 | Qt3DExtras::Quick::Qt3DQuickWindow view; |
| 14 | view.setWidth(600); |
| 15 | view.setHeight(600); |
| 16 | view.engine()->qmlEngine()->rootContext()->setContextProperty("_view", &view); |
| 17 | view.setSource(QUrl(QStringLiteral("qrc:/main.qml"))); |
| 18 | view.show(); |
| 19 | |
| 20 | return app.exec(); |
| 21 | } |