Sine Striker
2023-12-24 46285db399f75154ad6c451e12f2cae2e59ace25
examples/mainwindow/mainwindow.cpp
@@ -115,6 +115,10 @@
    windowAgent = new QWK::WidgetWindowAgent(this);
    windowAgent->setup(this);
#ifdef Q_OS_WIN
    windowAgent->setWindowAttribute(QStringLiteral("dark-mode"), true);
#endif
    // 2. Construct your title bar
    auto menuBar = [this]() {
        auto menuBar = new QMenuBar();
@@ -298,10 +302,6 @@
    if (!styleSheet().isEmpty() && theme == currentTheme)
        return;
    currentTheme = theme;
#ifdef Q_OS_WIN
    windowAgent->setWindowAttribute(QStringLiteral("dark-mode"), currentTheme == Dark);
#endif
    if (QFile qss(theme == Dark ? QStringLiteral(":/dark-style.qss")
                                : QStringLiteral(":/light-style.qss"));