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>
bb10
Paul Wicking 2018-07-11 15:35:16 +02:00
parent 1faf5a3610
commit 4ebe4f4b72
1 changed files with 6 additions and 2 deletions

View File

@ -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.