Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtlabsstylekit-index.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtlabsstylekit-index.html
6
\title Qt Labs StyleKit
7
\brief A high-level styling API for Qt Quick Controls
8
9
StyleKit is a declarative styling system for \l {Qt Quick Controls}, built on top of
10
\l {Qt Quick Templates 2}{Qt Quick Templates}. It lets you define a complete visual style
11
for all your controls from a single \l Style object, including support for themes, state-based
12
styling, and transitions.
13
StyleKit handles the underlying template implementation automatically, letting you focus
14
purely on visual aspects such as colors, dimensions, borders, and shadows.
15
16
A key strength of StyleKit is its hierarchical property system: set a property once
17
on a base type like \l {StyleKitControls::}{abstractButton}, and it
18
automatically applies to all button-like controls.
19
Override it where needed for specific controls or states. Changes to your
20
style are instantly reflected across all controls, ensuring consistency while still
21
allowing fine-grained customization.
22
23
For controls that need custom behavior beyond what StyleKit provides, you can still
24
implement custom templates and integrate them seamlessly alongside StyleKit-styled
25
controls.
26
27
\section1 Key Features
28
29
\list
30
\li \b{Declarative Styling} - An easy-to-use QML API that lets you focus on design over implementation
31
\li \b{Hierarchical Fallbacks} - All properties propagate. Set them once, override where needed
32
\li \b{State-Based Styling} - Design separate appearances for hovered, pressed, focused, etc.
33
\li \b{Animated Transitions} - Define smooth animations between states
34
\li \b{Theme Support} - Design light and dark themes, and any number of custom themes
35
\li \b{Variations} - Design multiple variations of the same controls
36
\li \b{Palette and Font Integration} - Configure control palettes and fonts using QML
37
\endlist
38
39
\section1 Using the Module in your Project
40
The QML types of the module are available through the \c QtQuick.labs.StyleKit import.
41
To use the types, add the following import statement to your .qml file:
42
43
\qml
44
import Qt.labs.StyleKit
45
\endqml
46
47
\section1 Articles and Guides
48
49
\section1 Examples
50
51
\section1 QML Types
52
53
\generatelist {qmltypesbymodule Qt.labs.StyleKit}
54
*/
qtdeclarative
src
labs
stylekit
doc
src
qtlabsstylekit-index.qdoc
Generated on
for Qt by
1.16.1