From e09b474e2e9fb9ae87536bdce5c8df3c5f8006ee Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 17 Oct 2023 22:02:25 +0800 Subject: import(teapot): Startup! --- works/teapot/main.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 works/teapot/main.cpp (limited to 'works/teapot/main.cpp') 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 +#include +#include + +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(); +} -- cgit v1.2.3