Better_Software_Header_Mobile Better_Software_Header_Web

Find what you need - explore our website and developer resources

Integrate QML Window's Background with the System's Color Palette

For a Correct Background Color When Resizing

Thumbnail: A window with a white border where there should be a background color.

Window {
    color: "lightblue"
}
import QtQuick
Window {
    color: systemPalette.window
    SystemPalette {
        id: systemPalette
    }
}

Animation of a window resizing, letting the white background seep through a corner.

Animation of a window resizing. The background color is consistent with the theme at all times.

A window from one OS, with a light theme. Its contents can be read just fine.

A window from a different OS, with a dark theme. Some of it contents cannot be read due to a lack of contrast.

About KDAB