<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- Switch.qml -->
  <meta name="description" content="A component that can be turned on or off.">
  <title>Switch QML Type | Qt 6.2.11</title>
</head>
<body>
<li><a href="qdoc-test-qmlmodule.html" translate="no">Types</a></li>
<li><a href="uicomponents-qmlmodule.html" translate="no">UIComponents</a></li>
<li>Switch</li>
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title" translate="no">Switch QML Type</h1>
<!-- $$$Switch-brief -->
<p>A component that can be turned on or off. <a href="#details">More...</a></p>
<!-- @@@Switch -->
<div class="table"><table class="alignedsummary requisites" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> <code translate="no">import UIComponents 1.0</code></td></tr>
</table></div>
<ul>
<li><a href="qml-uicomponents-switch-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn" translate="no"><b><a href="qml-uicomponents-switch.html#on-prop" translate="no">on</a></b> : bool</li>
</ul>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn" translate="no"><b><a href="qml-uicomponents-switch.html#toggle-method" translate="no">toggle</a></b>()</li>
</ul>
<!-- $$$Switch-description -->
<h2 id="details">Detailed Description</h2>
<p>A toggle switch has two states: an <code translate="no">on</code> and an <code translate="no">off</code> state. The <code translate="no">off</code> state is when the <a href="qml-uicomponents-switch.html#on-prop" translate="no">on</a> property is set to <code translate="no">false</code>.</p>
<p>The ToggleSwitch component is part of the <a href="uicomponents-qmlmodule.html" translate="no">UI Components</a> module.</p>
<p>This documentation is part of the <a href="test-componentset-example.html">UIComponents</a> example.</p>
<!-- @@@Switch -->
<h2>Property Documentation</h2>
<!-- $$$on -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="on-prop">
<td class="tblQmlPropNode"><p>
<span class="name">on</span> : <span class="type">bool</span></p></td></tr>
</table></div></div>
<div class="qmldoc"><p>Indicates the state of the switch. If <code translate="no">false</code>, then the switch is in the <code translate="no">off</code> state.</p>
</div></div><!-- @@@on -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$toggle[overload1]$$$toggle -->
<div class="qmlitem"><div class="qmlproto" translate="no">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="toggle-method">
<td class="tblQmlFuncNode"><p>
<span class="name">toggle</span>()</p></td></tr>
</table></div></div>
<div class="qmldoc"><p>A method to toggle the switch. If the switch is <code translate="no">on</code>, the toggling it will turn it <code translate="no">off</code>. Toggling a switch in the <code translate="no">off</code> position will turn it <code translate="no">on</code>.</p>
</div></div><!-- @@@toggle -->
<br/>
</body>
</html>
