- Qt 6.11
- Qt Labs StyleKit
- QML Types
- StyleKit
- Qt 6.11.2 Reference Documentation

# StyleKit QML Type

A singleton for setting and accessing the current style. More...

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

- List of all members, including inherited members

## Properties

- debug : StyleKitDebug
- style : Style
- styleUrl : string
- transitionsEnabled : bool

## Methods

- bool styleLoaded()

## Detailed Description

`StyleKit` is a singleton for setting the application Style.

     // Main.qml

     import QtQuick
     import Qt.labs.StyleKit

     ApplicationWindow {
         id: app
         width: 1024
         height: 800
         visible: true

         // Assign the style to be used
         StyleKit.style: PlainStyle {}

         // Controls are used as normal
         Column {
             anchors.fill: parent
             anchors.margins: 10
             spacing: 10

             Button {
                 text: "Button"
             }

             Slider {
                 width: 200
             }
         }
     }

It also provides properties for global StyleKit configuration and debugging.

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

See also Style and StyleVariation.

## Property Documentation

### debug : StyleKitDebug `[read-only]`

A run-time debugging tool that can be used to trace style properties for a specific Control.

### style : Style

The active style for the application.

Set this to a Style instance to apply it to all Qt Quick Controls.

     // Main.qml

     import QtQuick
     import Qt.labs.StyleKit

     ApplicationWindow {
         id: app
         width: 1024
         height: 800
         visible: true

         // Assign the style to be used
         StyleKit.style: PlainStyle {}

         // Controls are used as normal
         Column {
             anchors.fill: parent
             anchors.margins: 10
             spacing: 10

             Button {
                 text: "Button"
             }

             Slider {
                 width: 200
             }
         }
     }

Note: For best startup performance, set the style on the root ApplicationWindow, before any child controls.

See also styleUrl and Style.

### styleUrl : string

An alternative to style that loads a Style from a URL.

See also style.

### transitionsEnabled : bool

Controls whether transitions are enabled globally.

Set this to `false` to disable all transitions in the current style.

The default value is `true`.

See also ControlStyle::transition.

## Method Documentation

### bool styleLoaded()

Returns `true` when the active style and its current theme have both finished loading. This can be used to defer initialization logic that depends on resolved style properties.

See also style and theme.