This file only offers documentation for the additional properties of components given by the SnowWhite theme.
On doc.qt.io, you can find the documentation for the remaining components.
- Quick Start
- Change Color Theme
- Components
- base
- DashedRing
[base]
- DashedRing
- Button
- Dial
- ProgressBar
- SnowWhite
[singleton]
- base
See the Usage section of the main README page.
To alter the color scheme of a component, update the palette properties on the parent component so that all children are affected.
button:
palette.button
palette.buttonText
window & base:
palette.base
palette.text
palette.window
palette.windowText
highlights:
palette.highlight
palette.highlightedText
This is a basic component which generates a dashed ring.
The number of dashes on the ring is specified by this property.
This property specifies the width of the border, which can range from
This property specifies the width of dashes.
This property derives from the Control
component, which specifies the color
of the dashes.
DashedRing {
width: 100
height: 100
borderWidth: 2
dashWidth: 2
dashCount: 25
palette.base: 'blue'
}
This property determines the radius of background.
This property refers to the DashedRing component used in the Dial component.
This property determines the orientation of the ProgressBar component.
Either Qt.Horizontal
or Qt.Vertical
can be the value.
This function returns an average color from two input color RGBA values.
SnowWhite.blend(Qt.rgba(0, 0, 0, 1), Qt.rgba(1, 1, 1, 0));
// Qt.rgba(.5, .5, .5, .5)
This function set new alpha values for given color.
SnowWhite.setAlpha(Qt.rgba(1, 1, 1, 1), 0.3); // Qt.rgba(1, 1, 1, 0.3)
This functions constrain x
to lie between a
and b
.
SnowWhite.clamp(1, 3, 5); // 3
SnowWhite.clamp(1, 8, 5); // 5
SnowWhite.clamp(1,-4, 5); // 1
This function re-maps a number from one range to another.
SnowWhite.remap(2, 1, 3, 0, 10); // 5
This function invert RGB values of input color.
SnowWhite.invertColor(Qt.rgba(0.2, 1, 0.5, 1)); // Qt.rgba(0.8, 0, 0.5, 1)