summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/src/addressbook.qdoc
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2017-10-20 14:10:42 +0300
committerJędrzej Nowacki <jedrzej.nowacki@qt.io>2017-10-23 14:38:22 +0000
commitc181f418b9dd72e25ceff8ee7ccb030aa74f1cef (patch)
tree6712a13939fd5853f0a7485535654b2cb0376d8e /examples/widgets/doc/src/addressbook.qdoc
parent82c787ec3b0dc4ddc54639ad47eb82a052446858 (diff)
Address Book example: Correctly update "Edit entry" and "Remove entry" actions
They are not updated after switching tabs. Thus they can be enabled even when no entry is selected: select an entry on the current tab and then switch to an empty tab. Emit AddressWidget::selectionChanged() signal after changing the current tab to update these actions. Change-Id: I00da15ed6c3d3839210ae3ffbe1436e234695522 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/widgets/doc/src/addressbook.qdoc')
-rw-r--r--examples/widgets/doc/src/addressbook.qdoc11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/widgets/doc/src/addressbook.qdoc b/examples/widgets/doc/src/addressbook.qdoc
index cd7cd09f5b..1fa0bfa9d4 100644
--- a/examples/widgets/doc/src/addressbook.qdoc
+++ b/examples/widgets/doc/src/addressbook.qdoc
@@ -220,11 +220,12 @@
The QItemSelectionModel class provides a
\l{QItemSelectionModel::selectionChanged()}{selectionChanged}
signal that is connected to \c{AddressWidget}'s
- \c selectionChanged() signal. This signal to signal connection
- is necessary to enable the \uicontrol{Edit Entry...} and
- \uicontrol{Remove Entry} actions in \c MainWindow's Tools menu. This
- connection is further explained in \c MainWindow's
- implementation.
+ \c selectionChanged() signal. We also connect
+ QTabWidget::currentChanged() signal to the lambda expression which
+ emits \c{AddressWidget}'s \c selectionChanged() as well. These
+ connections are necessary to enable the \uicontrol{Edit Entry...} and
+ \uicontrol{Remove Entry} actions in \c MainWindow's Tools menu.
+ It is further explained in \c MainWindow's implementation.
Each table view in the address book is added as a tab to the
QTabWidget with the relevant label, obtained from the QStringList