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
qtquickcontrols-fusion.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtquickcontrols-fusion.html
6
\title Fusion Style
7
8
The Fusion style is a desktop-oriented style.
9
10
The Fusion style is a platform-agnostic style that offers a desktop-oriented
11
look and feel. It implements the same design language as the
12
\l {Qt Widget Gallery}{Fusion style for Qt Widgets}.
13
14
The Fusion style automatically switches dark and light themes according to
15
the system settings. For information on how to set custom theme colors,
16
refer to the \l {customize-fusion-style}{Customization} section.
17
18
\include style-screenshots.qdocinc {file} {Fusion} {fusion}
19
20
To run an application with the Fusion style, see
21
\l {Using Styles in Qt Quick Controls}.
22
23
\note The Fusion style is not a native desktop style. The style runs on any
24
platform, and looks similar everywhere. Minor differences may occur due to
25
differences in the standard system palettes, available fonts, and font
26
rendering engines.
27
28
\section2 Customization
29
\target customize-fusion-style
30
31
The Fusion style uses the standard system \l[QtQuick]{Palette}
32
to provide colors that match the desktop environment.
33
34
\image qtquickcontrols-fusion-palettes.png
35
{Fusion style controls in three color palettes}
36
37
You can specify custom palettes for any control, \l{Popup::palette}{popup},
38
or \l{Window::palette}{application window}. Explicit palette attributes are
39
automatically propagated from parent to children, overriding any system
40
defaults for that attribute. In the following example, the window and all
41
three switches appear with a violet highlight color:
42
43
\table
44
\row
45
\li
46
\qml
47
import QtQuick
48
import QtQuick.Controls
49
50
ApplicationWindow {
51
visible: true
52
53
palette.highlight: "violet"
54
55
Column {
56
anchors.centerIn: parent
57
58
Switch { text: qsTr("First"); checked: true }
59
Switch { text: qsTr("Second"); checked: true }
60
Switch { text: qsTr("Third") }
61
}
62
}
63
\endqml
64
\li
65
\image qtquickcontrols-fusion-violet.png
66
{Fusion style controls with custom violet palette}
67
\endtable
68
69
\b {See also} \l {Basic Style}, \l {Material Style}, \l {Universal Style}
70
71
\section1 Related Information
72
73
\list
74
\li \l{Styling Qt Quick Controls}
75
\endlist
76
*/
qtdeclarative
src
quickcontrols
doc
src
qtquickcontrols-fusion.qdoc
Generated on
for Qt by
1.16.1