- Qt 6.11
- Qt Labs StyleKit
- QML Types
- StyleKitDebug
- Qt 6.11.1 Reference Documentation

# StyleKitDebug QML Type

Traces how style properties are resolved for a control. More...

Import Statement: | `import Qt.labs.StyleKit`

- List of all members, including inherited members

## Properties

- control : Item
- filter : string

## Detailed Description

StyleKitDebug is a diagnostic tool that logs style property reads to the debug output. It is useful for understanding why a control ends up with a particular appearance, especially in complex styles that involve multiple themes or style variations.

It is accessed through StyleKit.debug.

Note: This tool is experimental. Enabling it will severely degrade performance and should only be used for debugging. The output format may change in future versions.

To start tracing, assign the id of a Control to the control property:

     StyleKit.debug.control: myButton

Each resolved property is printed as a single line showing where the value came from and what it resolved to:

     [read] StyleReader[Hovered].button.background.color -> MyStyle.Theme(Dark).button[Hovered] = #ff0000

Tracing the property reads of a StyleReader can produce a large amount of output. Use filter to limit the output to properties of interest.

Note: Types in Qt.labs modules are not guaranteed to remain compatible in future versions.

See also StyleKit::debug.

## Property Documentation

### control : Item

The id of the Control or StyleReader to trace.

When set, StyleKit logs all style property reads for this item to the debug output. Set to `null` to stop tracing.

See also filter.

### filter : string

A regular expression used to filter the debug output. Only lines matching the pattern are printed. By default, all output is shown.

For example, to only trace the background color:

     StyleKit.debug.filter: "background.color"

To trace all background colors, including properties such as background.color, background.border.color, background.image.color, and background.shadow.color, use a regular expression:

     StyleKit.debug.filter: "background.*color"

See also control.