| 1 |
// Copyright (C) 2018 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
#include <QGuiApplication> |
| 5 |
#include <QQmlApplicationEngine> |
| 6 |
|
| 7 |
int main(int argc, char *argv[]) |
| 8 |
{ |
| 9 |
if (qEnvironmentVariableIsEmpty("QTGLESSTREAM_DISPLAY")) { |
| 10 |
qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", QByteArray("213")); |
| 11 |
qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", QByteArray("120")); |
| 12 |
|
| 13 |
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
| 14 |
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); |
| 15 |
#endif |
| 16 |
} |
| 17 |
|
| 18 |
QGuiApplication app(argc, argv); |
| 19 |
|
| 20 |
QQmlApplicationEngine engine; |
| 21 |
engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); |
| 22 |
if (engine.rootObjects().isEmpty()) |
| 23 |
return -1; |
| 24 |
|
| 25 |
return app.exec(); |
| 26 |
} |