[Interest] Qt-12 with Dark Theme on MacOS Mojave

David Garcia david.garcia at aimsun.com
Fri Dec 21 17:23:53 CET 2018


Robert,

I’m using this code to detect Dark mode in macOS:

bool MacOSDarkMode()
{
    NSAppearance *appearance = NSAppearance.currentAppearance;
    if (@available(*, macOS 10.14)) {
        return appearance.name == NSAppearanceNameDarkAqua;
    }
    return NO;
}

I have it inside a MM file, included in our PRO using OBJECTIVE_SOURCES.

The code is OK for macOS but I don't have anything for Windows Dark mode detection, anyone?

Saludos,

David





More information about the Interest mailing list