2022-06-08 12:47:24 +00:00
|
|
|
// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
|
2024-02-23 14:41:04 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
2015-12-08 08:01:15 +00:00
|
|
|
|
|
|
|
#include <QGuiApplication>
|
|
|
|
#include <QQuickView>
|
2021-07-10 22:40:45 +00:00
|
|
|
#include <Qt3DRender/qt3drender-config.h>
|
2015-12-08 08:01:15 +00:00
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
QGuiApplication app(argc, argv);
|
|
|
|
|
2021-07-10 22:40:45 +00:00
|
|
|
#if !QT_CONFIG(qt3d_rhi_renderer)
|
|
|
|
qputenv("QSG_RHI_BACKEND", "opengl");
|
|
|
|
#endif
|
|
|
|
|
2015-12-08 08:01:15 +00:00
|
|
|
QQuickView view;
|
|
|
|
|
|
|
|
view.resize(500, 500);
|
|
|
|
view.setResizeMode(QQuickView::SizeRootObjectToView);
|
|
|
|
view.setSource(QUrl("qrc:/main.qml"));
|
|
|
|
view.show();
|
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|