<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qtlabscontrols-buttons.qdoc --> <title>Button Controls | Qt Labs Controls 5.6</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> window.onload = function(){document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");}; </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.6</td><td ><a href="qtlabscontrols-index.html">Qt Labs Controls</a></td><td >Button Controls</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.6.2 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="#button-control">Button Control</a></li> <li class="level1"><a href="#checkbox-control">CheckBox Control</a></li> <li class="level1"><a href="#radiobutton-control">RadioButton Control</a></li> <li class="level1"><a href="#switch-control">Switch Control</a></li> <li class="level1"><a href="#toolbutton-control">ToolButton Control</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">Button Controls</h1> <span class="subtitle"></span> <!-- $$$qtlabscontrols-buttons.html-description --> <div class="descr"> <a name="details"></a> <p>Qt Labs Controls offers a selection of button-like controls.</p> <div class="table"><table class="annotated"> <tr class="odd topAlign"><td class="tblName"><p><a href="qml-qt-labs-controls-abstractbutton.html">AbstractButton</a></p></td><td class="tblDescr"><p>Base of all button controls</p></td></tr> <tr class="even topAlign"><td class="tblName"><p><a href="qml-qt-labs-controls-button.html">Button</a></p></td><td class="tblDescr"><p>A button control</p></td></tr> <tr class="odd topAlign"><td class="tblName"><p><a href="qml-qt-labs-controls-checkbox.html">CheckBox</a></p></td><td class="tblDescr"><p>A check box control</p></td></tr> <tr class="even topAlign"><td class="tblName"><p><a href="qml-qt-labs-controls-radiobutton.html">RadioButton</a></p></td><td class="tblDescr"><p>A radio button control</p></td></tr> <tr class="odd topAlign"><td class="tblName"><p><a href="qml-qt-labs-controls-switch.html">Switch</a></p></td><td class="tblDescr"><p>A switch control</p></td></tr> <tr class="even topAlign"><td class="tblName"><p><a href="qml-qt-labs-controls-toolbutton.html">ToolButton</a></p></td><td class="tblDescr"><p>A tool button control</p></td></tr> </table></div> <p>Each type of button has its own specific target use case. The following sections offer guidelines for choosing the appropriate type of button, depending on the use case.</p> <a name="button-control"></a> <h2 id="button-control">Button Control</h2> <p class="centerAlign"><img src="images/qtlabscontrols-button.png" alt="" /></p><p><a href="qml-qt-labs-controls-button.html">Button</a> presents a push-button control that can be pushed or clicked by the user. Buttons are normally used to perform an action, or to answer a question. Typical buttons are <i>OK</i>, <i>Apply</i>, <i>Cancel</i>, <i>Close</i>, <i>Yes</i>, <i>No</i>, and <i>Help</i>.</p> <a name="checkbox-control"></a> <h2 id="checkbox-control">CheckBox Control</h2> <p class="centerAlign"><img src="images/qtlabscontrols-checkbox.png" alt="" /></p><p><a href="qml-qt-labs-controls-checkbox.html">CheckBox</a> presents an option button that can be toggled on (checked) or off (unchecked). Check boxes are typically used to select one or more options from a set of options.</p> <a name="radiobutton-control"></a> <h2 id="radiobutton-control">RadioButton Control</h2> <p class="centerAlign"><img src="images/qtlabscontrols-radiobutton.png" alt="" /></p><p><a href="qml-qt-labs-controls-radiobutton.html">RadioButton</a> presents an option button that can be toggled on (checked) or off (unchecked). Radio buttons are typically used to select one option from a set of options.</p> <a name="switch-control"></a> <h2 id="switch-control">Switch Control</h2> <p class="centerAlign"><img src="images/qtlabscontrols-switch.png" alt="" /></p><p><a href="qml-qt-labs-controls-switch.html">Switch</a> is an option button that can be dragged or toggled on (checked) or off (unchecked). Switches are typically used to select between two states.</p> <a name="toolbutton-control"></a> <h2 id="toolbutton-control">ToolButton Control</h2> <p class="centerAlign"><img src="images/qtlabscontrols-toolbutton.png" alt="" /></p><p><a href="qml-qt-labs-controls-toolbutton.html">ToolButton</a> is functionally similar to <a href="qml-qt-labs-controls-button.html">Button</a>, but provides a look that is more suitable within a <a href="qml-qt-labs-controls-toolbar.html">ToolBar</a>.</p> </div> <!-- @@@qtlabscontrols-buttons.html --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2016 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>