Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 \include style-screenshots.qdocinc {file} {Fusion} {fusion}
15
16 To run an application with the Fusion style, see
17 \l {Using Styles in Qt Quick Controls}.
18
19 \note The Fusion style is not a native desktop style. The style runs on any
20 platform, and looks similar everywhere. Minor differences may occur due to
21 differences in the standard system palettes, available fonts, and font
22 rendering engines.
23
24 \section2 Customization
25
26 The Fusion style uses the standard system \l[QtQuick]{Palette}
27 to provide colors that match the desktop environment.
28
29 \image qtquickcontrols-fusion-palettes.png
30
31 Custom palettes can be specified for any control,
32 \l{Popup::palette}{popup}, or \l{Window::palette}{application window}.
33 Explicit palette attributes are automatically propagated from parent to children,
34 overriding any system defaults for that attribute. In the following example,
35 the window and all three switches appear with a violet highlight color:
36
37 \table
38 \row
39 \li
40 \qml
41 import QtQuick 2.12
42 import QtQuick.Controls 2.12
43
44 ApplicationWindow {
45 visible: true
46
47 palette.highlight: "violet"
48
49 Column {
50 anchors.centerIn: parent
51
52 Switch { text: qsTr("First"); checked: true }
53 Switch { text: qsTr("Second"); checked: true }
54 Switch { text: qsTr("Third") }
55 }
56 }
57 \endqml
58 \li
59 \image qtquickcontrols-fusion-violet.png
60 \endtable
61
62 \b {See also} \l {Basic Style}, \l {Material Style}, \l {Universal Style}
63
64 \section1 Related Information
65
66 \list
67 \li \l{Styling Qt Quick Controls}
68 \endlist
69*/