aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2016-03-31 16:58:08 +0200
committerMitch Curtis <mitch.curtis@theqtcompany.com>2016-04-13 13:53:19 +0000
commite719087dce50d739c723c5ef9af2a9226318aa02 (patch)
tree695fcd6493a30e64ae8e4b8d6e6c73a01eb1d4f8 /src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
parent0a9634b74c21881deb125a8f7a4c9fea787ca636 (diff)
Add SwitchDelegate
SwitchDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to Switch) to reflect what is most commonly seen on mobile. Change-Id: I6f8fca8d1a8c91f2cb9d8bbbb685ad163712dfa1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc')
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
index 4975ac24..4204de4b 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
@@ -566,6 +566,29 @@
\snippet Switch.qml indicator
+ \section1 Customizing SwitchDelegate
+
+ SwitchDelegate consists of three visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{contentItem} and \l {AbstractButton::indicator}{indicator}.
+
+ \section3 Background
+
+ \image qtquickcontrols-switchdelegate-background.png
+
+ \snippet SwitchDelegate.qml background
+
+ \section3 Content item
+
+ \image qtquickcontrols-switchdelegate-contentItem.png
+
+ \snippet SwitchDelegate.qml contentItem
+
+ \section3 Indicator
+
+ \image qtquickcontrols-switchdelegate-indicator.png
+
+ \snippet SwitchDelegate.qml indicator
+
\section1 Customizing TabBar
TODO