diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-02-12 15:55:21 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-02-12 16:17:30 +0800 |
commit | f1bbbed7d1d568053cad3e203dcfb71177972329 (patch) | |
tree | 4068acd33f4e632a1224e140d5f510bb9520154e /works/teapot/main.cpp | |
parent | 0b5b206613f5580f85c5cd83ce03c5a637247346 (diff) | |
parent | cb0e3a0fb536284bdf366b0bdca2f8f0bfdcf6d1 (diff) | |
download | crupest-f1bbbed7d1d568053cad3e203dcfb71177972329.tar.gz crupest-f1bbbed7d1d568053cad3e203dcfb71177972329.tar.bz2 crupest-f1bbbed7d1d568053cad3e203dcfb71177972329.zip |
import(teapot): IMPORT crupest/teapot COMPLETE.
Diffstat (limited to 'works/teapot/main.cpp')
-rw-r--r-- | works/teapot/main.cpp | 20 |
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(); +} |