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
36
You can specify custom palettes for any control, \l{Popup::palette}{popup},
37
or \l{Window::palette}{application window}. Explicit palette attributes are
38
automatically propagated from parent to children, overriding any system
39
defaults for that attribute. In the following example, the window and all
40
three switches appear with a violet highlight color:
41
42
\table
43
\row
44
\li
45
\qml
46
import QtQuick 2.12
47
import QtQuick.Controls 2.12
48
49
ApplicationWindow {
50
visible: true
51
52
palette.highlight: "violet"
53
54
Column {
55
anchors.centerIn: parent
56
57
Switch { text: qsTr("First"); checked: true }
58
Switch { text: qsTr("Second"); checked: true }
59
Switch { text: qsTr("Third") }
60
}
61
}
62
\endqml
63
\li
64
\image qtquickcontrols-fusion-violet.png
65
\endtable
66
67
\b {See also} \l {Basic Style}, \l {Material Style}, \l {Universal Style}
68
69
\section1 Related Information
70
71
\list
72
\li \l{Styling Qt Quick Controls}
73
\endlist
74
*/
qtdeclarative
src
quickcontrols
doc
src
qtquickcontrols-fusion.qdoc
Generated on
for Qt by
1.14.0