aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickgroupbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/qquickgroupbox.cpp')
-rw-r--r--src/templates/qquickgroupbox.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/templates/qquickgroupbox.cpp b/src/templates/qquickgroupbox.cpp
index 2f120879..ef8789a5 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
@@ -126,7 +139,7 @@ void QQuickGroupBox::setLabel(QQuickItem *label)
QFont QQuickGroupBox::defaultFont() const
{
- return QQuickControlPrivate::themeFont(QPlatformTheme::MdiSubWindowTitleFont); // tmp
+ return QQuickControlPrivate::themeFont(QPlatformTheme::GroupBoxTitleFont);
}
QT_END_NAMESPACE