diff options
Diffstat (limited to 'tests/manual/wave/main.cpp')
-rw-r--r-- | tests/manual/wave/main.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/manual/wave/main.cpp b/tests/manual/wave/main.cpp new file mode 100644 index 000000000..a136cdb3c --- /dev/null +++ b/tests/manual/wave/main.cpp @@ -0,0 +1,24 @@ +// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <Qt3DQuickExtras/qt3dquickwindow.h> +#include <Qt3DQuick/QQmlAspectEngine> +#include <QGuiApplication> +#include <QQmlEngine> +#include <QQmlContext> + +int main(int argc, char* argv[]) +{ + // Force Qt3D OpenGL renderer + qputenv("QT3D_RENDERER", "opengl"); + + QGuiApplication app(argc, argv); + Qt3DExtras::Quick::Qt3DQuickWindow view; + + // Expose the window as a context property so we can set the aspect ratio + view.engine()->qmlEngine()->rootContext()->setContextProperty("_window", &view); + view.setSource(QUrl("qrc:/main.qml")); + view.show(); + + return app.exec(); +} |