diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-10 16:41:59 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-10 16:52:18 +0000 |
commit | 2412b3238fa0746624975fcd66765346d8029a16 (patch) | |
tree | 12289e69fa228a9fe2dc7c70adbee77b5f07e20c /src/controls/qquicktogglebutton.cpp | |
parent | b57245ac65d339d4aa803d38005118b99783b2b3 (diff) |
Docs: ToggleButton
Change-Id: Id4db1808a42ee29c030f095f8c87542de1702ce0
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/qquicktogglebutton.cpp')
-rw-r--r-- | src/controls/qquicktogglebutton.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/controls/qquicktogglebutton.cpp b/src/controls/qquicktogglebutton.cpp index 40ea2e02..a399691e 100644 --- a/src/controls/qquicktogglebutton.cpp +++ b/src/controls/qquicktogglebutton.cpp @@ -46,7 +46,33 @@ QT_BEGIN_NAMESPACE \ingroup buttons \brief A toggle button control. - TODO + ToggleButton is an option button that can be dragged or toggled on + (checked) or off (unchecked). ToggleButtons are typically used to + select between two states. + + \table + \row \li \image qtquickcontrols2-togglebutton-normal.png + \li A toggle button in its normal state. + \row \li \image qtquickcontrols2-togglebutton-checked.png + \li A toggle button that is checked. + \row \li \image qtquickcontrols2-togglebutton-focused.png + \li A toggle button that has active focus. + \row \li \image qtquickcontrols2-togglebutton-disabled.png + \li A toggle button that is disabled. + \endtable + + \code + ColumnLayout { + ToggleButton { + text: qsTr("Wi-Fi") + } + ToggleButton { + text: qsTr("Bluetooth") + } + } + \endcode + + \sa {Customizing ToggleButton} */ QQuickToggleButton::QQuickToggleButton(QQuickItem *parent) : |