This page contains a list of all environment variables that Qt Quick Controls 2 supports. The environment variables are primarily meant for testing purposes, but they can also be used to set system-wide defaults.
变量 | 描述 |
---|---|
QT_QUICK_CONTROLS_STYLE
|
指定默认
Qt Quick Controls 2 style
. The value can be either one of the built-in styles, for example
"Material"
, or the path to a custom style such as
":/mystyle"
.
|
QT_QUICK_CONTROLS_FALLBACK_STYLE
|
Specifies a fallback style for
custom styles
. The value can be one of the built-in styles, for example
"Material"
,
|
QT_QUICK_CONTROLS_STYLE_PATH
|
Specifies a list of additional paths that are used to lookup
Qt Quick Controls 2 styles
. Multiple path entries must be
separated
by
':'
under Unix and
';'
under Windows. By default, styles are looked up from
$QML2_IMPORT_PATH/QtQuick/Controls.2
.
|
QT_QUICK_CONTROLS_CONF
|
Specifies the location of the
Qt Quick Controls 2 configuration file
. By default, the configuration file is loaded from the application's resources in
":/qtquickcontrols2.conf"
.
|
QT_QUICK_CONTROLS_HOVER_ENABLED
|
Specifies whether Qt Quick Controls 2 use
hover effects
. The value can be set to
0
or
1
to disable or enable hover effects, respectively.
|
材质风格 specific environment variables:
变量 | 描述 |
---|---|
QT_QUICK_CONTROLS_MATERIAL_THEME
|
指定默认
材质主题
. The value can be one of the available themes, for example
"Dark"
.
|
QT_QUICK_CONTROLS_MATERIAL_ACCENT
|
指定默认
Material accent color
。值可以是任何
color
, but it is recommended to use one of the
预定义材质颜色
,例如
"Teal"
.
|
QT_QUICK_CONTROLS_MATERIAL_PRIMARY
|
指定默认
Material primary color
。值可以是任何
color
, but it is recommended to use one of the
预定义材质颜色
,例如
"BlueGrey"
.
|
QT_QUICK_CONTROLS_MATERIAL_FOREGROUND
|
指定默认
材质前景颜色
。值可以是任何
color
,或某一
预定义材质颜色
,例如
"Brown"
.
|
QT_QUICK_CONTROLS_MATERIAL_BACKGROUND
|
指定默认
材质背景颜色
。值可以是任何
color
,或某一
预定义材质颜色
,例如
"Grey"
.
|
Universal style specific environment variables:
变量 | 描述 |
---|---|
QT_QUICK_CONTROLS_UNIVERSAL_THEME
|
指定默认
通用主题
. The value can be one of the available themes, for example
"Dark"
.
|
QT_QUICK_CONTROLS_UNIVERSAL_ACCENT
|
指定默认
Universal accent color
。值可以是任何
color
, but it is recommended to use one of the
预定义通用颜色
,例如
"Violet"
.
|
QT_QUICK_CONTROLS_UNIVERSAL_FOREGROUND
|
指定默认
通用前景颜色
。值可以是任何
color
,或某一
预定义通用颜色
,例如
"Brown"
.
|
QT_QUICK_CONTROLS_UNIVERSAL_BACKGROUND
|
指定默认
通用背景颜色
。值可以是任何
color
,或某一
预定义通用颜色
,例如
"Steel"
.
|