hyprland-qtutils/utils/donate-screen/main.cpp

30 lines
894 B
C++
Raw Permalink Normal View History

2025-01-07 14:53:19 +01:00
#include "DonateScreen.hpp"
#include <QGuiApplication>
#include <QQmlApplicationEngine>
2025-01-07 14:53:19 +01:00
#include <QQmlContext>
#include <QQuickStyle>
#include <QtEnvironmentVariables>
#include <hyprutils/string/VarList.hpp>
2025-01-07 14:53:19 +01:00
using namespace Hyprutils::String;
int main(int argc, char* argv[]) {
// disable logs to not trash the stdout
qputenv("QT_LOGGING_RULES", QByteArray("*.debug=false;qml=false"));
auto dialog = new CDonateScreen();
QGuiApplication app(argc, argv);
2025-01-07 14:53:19 +01:00
app.setApplicationName("Support Hyprland");
app.setApplicationDisplayName("Support Hyprland");
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE"))
QQuickStyle::setStyle("org.hyprland.style");
2025-01-07 14:53:19 +01:00
QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty("donateScreen", dialog);
engine.load("qrc:/qt/qml/org/hyprland/donate-screen/main.qml");
return app.exec();
}