aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-05 12:35:08 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-09 16:27:00 +0000
commit10458b3d4dc1ed9f06eece9d61d2e699e602117d (patch)
treebdffb6b584965cbe8a03d4dffea2097201bddefe /src/templates
parentf2f9786e6194725bf48ee3833b1fdf9603b74e69 (diff)
GroupBox: add an example of a checkable groupbox
Adjust the size calculation so that the example works smooth. Change-Id: Iaf25107b0cfaa3ceef0caeba120d1bd74c9bc854 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/qquickgroupbox.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/templates/qquickgroupbox.cpp b/src/templates/qquickgroupbox.cpp
index 2f120879..ef9e3da8 100644
--- a/src/templates/qquickgroupbox.cpp
+++ b/src/templates/qquickgroupbox.cpp
@@ -62,7 +62,20 @@ QT_BEGIN_NAMESPACE
\snippet qtlabscontrols-groupbox.qml 1
- \sa {Customizing GroupBox}, {Container Controls}
+ \section2 Checkable GroupBox
+
+ Even though GroupBox has no built-in check box, it is straightforward
+ to create a checkable GroupBox by pairing it with a CheckBox.
+
+ \image qtlabscontrols-groupbox-checkable.png
+
+ It is a common pattern to enable or disable the groupbox's children when
+ its check box is toggled on/off, respectively, but the semantics of the
+ check box is left to the application to decide.
+
+ \snippet qtlabscontrols-groupbox-checkable.qml 1
+
+ \sa CheckBox, {Customizing GroupBox}, {Container Controls}
*/
class QQuickGroupBoxPrivate : public QQuickFramePrivate