From ffae0f0842c4a3b116c3d8d2a099c1da0d527264 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 6 Oct 2016 16:39:21 +0200 Subject: RadioDelegate: fix documentation review findings Change-Id: If865baabc54406a51b00abe61197bda4a1370953 Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi --- src/quicktemplates2/qquickradiodelegate.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/quicktemplates2/qquickradiodelegate.cpp b/src/quicktemplates2/qquickradiodelegate.cpp index 01a27cc9..bf3557e8 100644 --- a/src/quicktemplates2/qquickradiodelegate.cpp +++ b/src/quicktemplates2/qquickradiodelegate.cpp @@ -56,9 +56,23 @@ QT_BEGIN_NAMESPACE off (unchecked). Radio delegates are typically used to select one option from a set of options. - The state of the radio delegate can be set with the + RadioDelegate inherits its API from \l ItemDelegate, which is inherited + from AbstractButton. For instance, you can set \l {AbstractButton::text}{text}, + and react to \l {AbstractButton::clicked}{clicks} using the AbstractButton + API. The state of the radio delegate can be set with the \l {AbstractButton::}{checked} property. + Radio delegates are \l {AbstractButton::autoExclusive}{auto-exclusive} + by default. Only one delegate can be checked at any time amongst radio + delegates that belong to the same parent item; checking another delegate + automatically unchecks the previously checked one. For radio delegates + that do not share a common parent, ButtonGroup can be used to manage + exclusivity. + + \l RadioButton is similar to RadioDelegate, except that it is typically + not used in views, but rather when there are only a few options, and often + with the requirement that each button is uniquely identifiable. + \code ButtonGroup { id: buttonGroup @@ -74,7 +88,7 @@ QT_BEGIN_NAMESPACE } \endcode - \sa {Customizing RadioDelegate}, {Delegate Controls} + \sa {Customizing RadioDelegate}, {Delegate Controls}, RadioButton */ QQuickRadioDelegate::QQuickRadioDelegate(QQuickItem *parent) : -- cgit v1.2.3