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