1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
/*
* SPDX-FileCopyrightText: 2023 George Florea Bănuș <georgefb899@gmail.com>
*
* SPDX-License-Identifier: MIT
*/
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
int main(int argc, char *argv[])
{
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine(&app);
// clang-format off
QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() {
QCoreApplication::exit(-1);
}, Qt::QueuedConnection);
// clang-format on
engine.loadFromModule("com.example.mpvqt", "Main");
return app.exec();
}
|