diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2016-10-06 16:39:21 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2016-10-07 10:46:10 +0000 |
commit | ffae0f0842c4a3b116c3d8d2a099c1da0d527264 (patch) | |
tree | c1423f119819ffd2b263b5484891e445ad060e71 /src | |
parent | 73cd7f2c6faff63dd31ffc896b032f0db932ecc2 (diff) |
RadioDelegate: fix documentation review findings
Change-Id: If865baabc54406a51b00abe61197bda4a1370953
Task-number: QTBUG-55904
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquickradiodelegate.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
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) : |