#include #include #include #include #include #include "greeter_backend.h" int main(int argc, char *argv[]) { qputenv("QT_QUICK_CONTROLS_STYLE", QByteArrayLiteral("Basic")); qputenv("QSG_RHI_BACKEND", QByteArrayLiteral("software")); qputenv("QT_QUICK_BACKEND", QByteArrayLiteral("software")); QQuickWindow::setGraphicsApi(QSGRendererInterface::Software); // Use the Redox-native QPA plugin (libqredox.so) instead of Wayland. // The Qt6 Wayland plugin crashes at null+8 during wl_registry init on Redox. // The redox QPA plugin renders directly to the framebuffer via scheme:display. if (qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM")) { qputenv("QT_QPA_PLATFORM", "redox"); } QGuiApplication app(argc, argv); QQuickStyle::setStyle(QStringLiteral("Basic")); GreeterBackend backend; QQmlApplicationEngine engine; engine.rootContext()->setContextProperty(QStringLiteral("greeterBackend"), &backend); engine.load(QUrl(QStringLiteral("qrc:/Main.qml"))); if (engine.rootObjects().isEmpty()) { return 1; } backend.initialize(); return app.exec(); }