summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2018-07-11 15:35:16 +0200
committerPaul Wicking <paul.wicking@qt.io>2018-07-11 15:21:24 +0000
commit4ebe4f4b727ee374fe5d5465f065ec1570fe3090 (patch)
tree6d86826abde5ce509bc57bce0bf7aafa0a6a5b58 /src/widgets
parent1faf5a36106ed55e7c15ad25d225ccf790b759d5 (diff)
Doc: Explain emission of QAction::changed on calling QAction::toggle
Extend description of QAction::checked() and QAction::toggled(), as it is not clear from the documentation that calling QAction::toggle causes the emission of a QAction::changed signal. Task-number: QTBUG-68213 Change-Id: I5afa4d9a6e6f001dff81271d1e34d0c515da3c24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qaction.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 0ef4ed0634..8a359346c9 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -968,7 +968,10 @@ void QAction::toggle()
Only checkable actions can be checked. By default, this is false
(the action is unchecked).
- \sa checkable
+ \note The notifier signal for this property is toggled(). As toggling
+ a QAction changes its state, it will also emit a changed() signal.
+
+ \sa checkable, toggled()
*/
void QAction::setChecked(bool b)
{
@@ -1190,7 +1193,8 @@ void QAction::activate(ActionEvent event)
This signal is emitted whenever a checkable action changes its
isChecked() status. This can be the result of a user interaction,
- or because setChecked() was called.
+ or because setChecked() was called. As setChecked() changes the
+ QAction, it emits changed() in addition to toggled().
\a checked is true if the action is checked, or false if the
action is unchecked.