/usr/share/qt5/doc/qtquickcontrols2/qtquickcontrols2-configuration.html is in qtquickcontrols2-5-doc-html 5.9.5-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtquickcontrols2-configuration.qdoc -->
<title>Qt Quick Controls 2 Configuration File | Qt Quick Controls 2 5.9</title>
<link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
<script type="text/javascript">
document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
// loading style sheet breaks anchors that were jumped to before
// so force jumping to anchor again
setTimeout(function() {
var anchor = location.hash;
// need to jump to different anchor first (e.g. none)
location.hash = "#";
setTimeout(function() {
location.hash = anchor;
}, 0);
}, 0);
</script>
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<table><tr>
<td >Qt 5.9</td><td ><a href="qtquickcontrols2-index.html">Qt Quick Controls 2</a></td><td >Qt Quick Controls 2 Configuration File</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.5 Reference Documentation</td>
</tr></table>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#controls-section">Controls Section</a></li>
<li class="level1"><a href="#material-section">Material Section</a></li>
<li class="level1"><a href="#universal-section">Universal Section</a></li>
<li class="level1"><a href="#using-the-configuration-file-in-a-project">Using the Configuration File in a Project</a></li>
<li class="level1"><a href="#related-information">Related Information</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Qt Quick Controls 2 Configuration File</h1>
<span class="subtitle"></span>
<!-- $$$qtquickcontrols2-configuration.html-description -->
<div class="descr"> <a name="details"></a>
<p>Qt Quick Controls 2 support a special configuration file, <code>:/qtquickcontrols2.conf</code>, that is built into an application's resources.</p>
<p>The configuration file can specify the preferred style and certain style-specific attributes. The following example specifies that the preferred style is the <a href="qtquickcontrols2-material.html">Material style</a>. Furthermore, when the application is run with the Material style, its theme is light and the accent and primary colors are teal and blue grey, respectively. However, if the application is run with the <a href="qtquickcontrols2-universal.html">Universal style</a> instead, the accent color is red and the appropriate theme is chosen based on the system theme colors.</p>
<pre class="cpp">
<span class="operator">[</span>Controls<span class="operator">]</span>
Style<span class="operator">=</span>Material
<span class="operator">[</span>Universal<span class="operator">]</span>
Theme<span class="operator">=</span>System
Accent<span class="operator">=</span>Red
<span class="operator">[</span>Material<span class="operator">]</span>
Theme<span class="operator">=</span>Light
Accent<span class="operator">=</span>Teal
Primary<span class="operator">=</span>BlueGrey
</pre>
<p>It is possible to specify a custom location for the configuration file with the <a href="qtquickcontrols2-environment.html">QT_QUICK_CONTROLS_CONF</a> environment variable.</p>
<a name="controls-section"></a>
<h2 id="controls-section">Controls Section</h2>
<p>The following values can be specified in a <code>Controls</code> section of the configuration file:</p>
<div class="table"><table class="generic">
<thead><tr class="qt-style"><th >Variable</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td ><code>Style</code></td><td >Specifies the style to run the application with. The value can be the name of one of the <a href="qtquickcontrols2-styles.html#available-styles">built-in styles</a> or a <a href="qtquickcontrols2-customize.html#creating-a-custom-style">custom style</a>.</td></tr>
<tr valign="top" class="even"><td ><code>FallbackStyle</code></td><td >Specifies the style to use for controls that are not implemented. The style must be one of the <a href="qtquickcontrols2-styles.html#available-styles">built-in styles</a>. By default, the <a href="qtquickcontrols2-default.html">Default</a> style is used.</td></tr>
</table></div>
<a name="material-section"></a>
<h2 id="material-section">Material Section</h2>
<p>The following <a href="qtquickcontrols2-material.html">Material style</a> specific values can be specified in a <code>Material</code> section of the configuration file:</p>
<div class="table"><table class="generic">
<thead><tr class="qt-style"><th >Variable</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td ><code>Theme</code></td><td >Specifies the default <a href="qtquickcontrols2-material.html#material-theme-attached-prop">Material theme</a>. The value can be one of the available themes, for example <code>"Dark"</code>.</td></tr>
<tr valign="top" class="even"><td ><code>Accent</code></td><td >Specifies the default <a href="qtquickcontrols2-material.html#material-accent-attached-prop">Material accent color</a>. The value can be any <a href="../qtquick/qml-color.html#colorbasictypedocs">color</a>, but it is recommended to use one of the <a href="qtquickcontrols2-material.html#pre-defined-material-colors">pre-defined Material colors</a>, for example <code>"Teal"</code>.</td></tr>
<tr valign="top" class="odd"><td ><code>Primary</code></td><td >Specifies the default <a href="qtquickcontrols2-material.html#material-primary-attached-prop">Material primary color</a>. The value can be any <a href="../qtquick/qml-color.html#colorbasictypedocs">color</a>, but it is recommended to use one of the <a href="qtquickcontrols2-material.html#pre-defined-material-colors">pre-defined Material colors</a>, for example <code>"BlueGrey"</code>.</td></tr>
<tr valign="top" class="even"><td ><code>Foreground</code></td><td >Specifies the default <a href="qtquickcontrols2-material.html#material-foreground-attached-prop">Material foreground color</a>. The value can be any <a href="../qtquick/qml-color.html#colorbasictypedocs">color</a>, or one of the <a href="qtquickcontrols2-material.html#pre-defined-material-colors">pre-defined Material colors</a>, for example <code>"Brown"</code>.</td></tr>
<tr valign="top" class="odd"><td ><code>Background</code></td><td >Specifies the default <a href="qtquickcontrols2-material.html#material-background-attached-prop">Material background color</a>. The value can be any <a href="../qtquick/qml-color.html#colorbasictypedocs">color</a>, or one of the <a href="qtquickcontrols2-material.html#pre-defined-material-colors">pre-defined Material colors</a>, for example <code>"Grey"</code>.</td></tr>
</table></div>
<a name="universal-section"></a>
<h2 id="universal-section">Universal Section</h2>
<p>The following <a href="qtquickcontrols2-universal.html">Universal style</a> specific values can be specified in a <code>Universal</code> section of the configuration file:</p>
<div class="table"><table class="generic">
<thead><tr class="qt-style"><th >Variable</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td ><code>Theme</code></td><td >Specifies the default <a href="qtquickcontrols2-universal.html#universal-theme-attached-prop">Universal theme</a>. The value can be one of the available themes, for example <code>"Dark"</code>.</td></tr>
<tr valign="top" class="even"><td ><code>Accent</code></td><td >Specifies the default <a href="qtquickcontrols2-universal.html#universal-accent-attached-prop">Universal accent color</a>. The value can be any <a href="../qtquick/qml-color.html#colorbasictypedocs">color</a>, but it is recommended to use one of the <a href="qtquickcontrols2-universal.html#pre-defined-universal-colors">pre-defined Universal colors</a>, for example <code>"Violet"</code>.</td></tr>
<tr valign="top" class="odd"><td ><code>Foreground</code></td><td >Specifies the default <a href="qtquickcontrols2-universal.html#universal-foreground-attached-prop">Universal foreground color</a>. The value can be any <a href="../qtquick/qml-color.html#colorbasictypedocs">color</a>, or one of the <a href="qtquickcontrols2-universal.html#pre-defined-universal-colors">pre-defined Universal colors</a>, for example <code>"Brown"</code>.</td></tr>
<tr valign="top" class="even"><td ><code>Background</code></td><td >Specifies the default <a href="qtquickcontrols2-universal.html#universal-background-attached-prop">Universal background color</a>. The value can be any <a href="../qtquick/qml-color.html#colorbasictypedocs">color</a>, or one of the <a href="qtquickcontrols2-universal.html#pre-defined-universal-colors">pre-defined Universal colors</a>, for example <code>"Steel"</code>.</td></tr>
</table></div>
<a name="using-the-configuration-file-in-a-project"></a>
<h2 id="using-the-configuration-file-in-a-project">Using the Configuration File in a Project</h2>
<p>In order to make it possible for Qt Quick Controls 2 to find the configuration file, it must be built into application's resources using the <a href="../qtcore/resources.html">The Qt Resource System</a>. Here's an example <code>.qrc</code> file:</p>
<pre class="cpp">
<span class="operator"><</span><span class="operator">!</span>DOCTYPE RCC<span class="operator">></span><span class="operator"><</span>RCC version<span class="operator">=</span><span class="string">"1.0"</span><span class="operator">></span>
<span class="operator"><</span>qresource prefix<span class="operator">=</span><span class="string">"/"</span><span class="operator">></span>
<span class="operator"><</span>file<span class="operator">></span>qtquickcontrols2<span class="operator">.</span>conf<span class="operator"><</span><span class="operator">/</span>file<span class="operator">></span>
<span class="operator"><</span><span class="operator">/</span>qresource<span class="operator">></span>
<span class="operator"><</span><span class="operator">/</span>RCC<span class="operator">></span>
</pre>
<p><b>Note: </b>Qt Quick Controls 2 uses a file selector to load the configuration file. It is possible to provide a different configuration file for different platforms and locales. See <a href="../qtcore/qfileselector.html">QFileSelector</a> documentation for more details.</p><p>Finally, the <code>.qrc</code> file must be listed in the application's <code>.pro</code> file so that the build system knows about it. For example:</p>
<pre class="cpp">
RESOURCES <span class="operator">=</span> application<span class="operator">.</span>qrc
</pre>
<a name="related-information"></a>
<h2 id="related-information">Related Information</h2>
<ul>
<li><a href="qtquickcontrols2-styles.html">Styling Qt Quick Controls 2</a></li>
<li><a href="qtquickcontrols2-environment.html">Supported Environment Variables in Qt Quick Controls 2</a></li>
</ul>
</div>
<!-- @@@qtquickcontrols2-configuration.html -->
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> 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. </p>
</div>
</body>
</html>
|