Supported Environment Variables in Qt Quick Controls 2
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.
Variable | Description |
---|---|
QT_QUICK_CONTROLS_STYLE | Specifies the default 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. |
Material style specific environment variables:
Variable | Description |
---|---|
QT_QUICK_CONTROLS_MATERIAL_THEME | Specifies the default Material theme. The value can be one of the available themes, for example "Dark" . |
QT_QUICK_CONTROLS_MATERIAL_ACCENT | Specifies the default Material accent color. The value can be any color, but it is recommended to use one of the pre-defined Material colors, for example "Teal" . |
QT_QUICK_CONTROLS_MATERIAL_PRIMARY | Specifies the default Material primary color. The value can be any color, but it is recommended to use one of the pre-defined Material colors, for example "BlueGrey" . |
QT_QUICK_CONTROLS_MATERIAL_FOREGROUND | Specifies the default Material foreground color. The value can be any color, or one of the pre-defined Material colors, for example "Brown" . |
QT_QUICK_CONTROLS_MATERIAL_BACKGROUND | Specifies the default Material background color. The value can be any color, or one of the pre-defined Material colors, for example "Grey" . |
Universal style specific environment variables:
Variable | Description |
---|---|
QT_QUICK_CONTROLS_UNIVERSAL_THEME | Specifies the default Universal theme. The value can be one of the available themes, for example "Dark" . |
QT_QUICK_CONTROLS_UNIVERSAL_ACCENT | Specifies the default Universal accent color. The value can be any color, but it is recommended to use one of the pre-defined Universal colors, for example "Violet" . |
QT_QUICK_CONTROLS_UNIVERSAL_FOREGROUND | Specifies the default Universal foreground color. The value can be any color, or one of the pre-defined Universal colors, for example "Brown" . |
QT_QUICK_CONTROLS_UNIVERSAL_BACKGROUND | Specifies the default Universal background color. The value can be any color, or one of the pre-defined Universal colors, for example "Steel" . |
Related Information
© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.