2022-05-13 13:12:05 +00:00
|
|
|
// Copyright (C) 2017 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-11-18 09:32:56 +00:00
|
|
|
|
|
|
|
#include <QtGui/QGuiApplication>
|
2014-09-22 14:04:19 +00:00
|
|
|
#include <QtGui/QScreen>
|
2012-03-05 01:39:24 +00:00
|
|
|
#include <QtQml/QQmlEngine>
|
|
|
|
#include <QtQml/QQmlComponent>
|
2013-05-29 08:29:08 +00:00
|
|
|
#include <QtQuick/QQuickWindow>
|
2011-11-18 09:32:56 +00:00
|
|
|
#include <QtCore/QUrl>
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
QGuiApplication app(argc, argv);
|
2012-03-05 01:39:24 +00:00
|
|
|
QQmlEngine engine;
|
2021-08-27 14:19:54 +00:00
|
|
|
|
|
|
|
// Add the qrc root as QML import path so that the "shared" module can be found.
|
|
|
|
engine.addImportPath(QStringLiteral(":/"));
|
|
|
|
|
2021-09-01 13:53:43 +00:00
|
|
|
#ifdef Q_OS_MACOS
|
|
|
|
engine.addImportPath(app.applicationDirPath() + QStringLiteral("/../PlugIns"));
|
|
|
|
#endif
|
|
|
|
|
2012-03-05 01:39:24 +00:00
|
|
|
QQmlComponent component(&engine);
|
2013-05-29 08:29:08 +00:00
|
|
|
QQuickWindow::setDefaultAlphaBuffer(true);
|
2013-03-08 15:44:52 +00:00
|
|
|
component.loadUrl(QUrl("qrc:///window/window.qml"));
|
2011-11-18 09:32:56 +00:00
|
|
|
if ( component.isReady() )
|
|
|
|
component.create();
|
|
|
|
else
|
|
|
|
qWarning() << component.errorString();
|
|
|
|
return app.exec();
|
|
|
|
}
|