aboutsummaryrefslogtreecommitdiff
path: root/works/teapot/main.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-02-12 15:55:21 +0800
committerYuqian Yang <crupest@crupest.life>2025-02-12 16:17:30 +0800
commita9f9e5daf8ffa74abe0042c586561e136478e423 (patch)
tree1e12ccc4063ef3ef09d89d98245fd94ca44e23ee /works/teapot/main.cpp
parent1e1ca99bde2d398ac5527cc74e6a3f8a2a70345f (diff)
parentcb0e3a0fb536284bdf366b0bdca2f8f0bfdcf6d1 (diff)
downloadcrupest-a9f9e5daf8ffa74abe0042c586561e136478e423.tar.gz
crupest-a9f9e5daf8ffa74abe0042c586561e136478e423.tar.bz2
crupest-a9f9e5daf8ffa74abe0042c586561e136478e423.zip
import(teapot): IMPORT crupest/teapot COMPLETE.
Diffstat (limited to 'works/teapot/main.cpp')
-rw-r--r--works/teapot/main.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/works/teapot/main.cpp b/works/teapot/main.cpp
new file mode 100644
index 0000000..804f8ff
--- /dev/null
+++ b/works/teapot/main.cpp
@@ -0,0 +1,20 @@
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+#include <QtQuick3D/qquick3d.h>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+ QSurfaceFormat::setDefaultFormat(QQuick3D::idealSurfaceFormat());
+ qputenv("QT_QUICK_CONTROLS_STYLE", "Basic");
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+ if (engine.rootObjects().isEmpty())
+ return -1;
+
+ return app.exec();
+}