summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2019-11-14 17:11:11 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2019-12-04 16:33:02 +0100
commitde6520805abafbc6f898b3fec043e5d85827dfd0 (patch)
tree592d2032a0fabefeb276db2ccc685bc8b7366624
parentd025c1a75f722f3adfd77f8d7f887e754c925d17 (diff)
Document that toggleViewAction can't be used to toggle the dock widget
...from code. This is by design; the action is updated when the dock widget changes, not the other way around (which would easily result in infinite loops). Change-Id: I9e71784d239a9cbb6c8efaeaa3e3adc6dc590f65 Fixes: QTBUG-80022 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
-rw-r--r--src/widgets/widgets/qdockwidget.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index 687ef8ba29..bcbd3dd2d4 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -1609,11 +1609,14 @@ bool QDockWidget::event(QEvent *event)
#ifndef QT_NO_ACTION
/*!
- Returns a checkable action that can be used to show or close this
- dock widget.
+ Returns a checkable action that can be added to menus and toolbars so that
+ the user can show or close this dock widget.
The action's text is set to the dock widget's window title.
+ \note The action can not be used to programmatically show or hide the dock
+ widget. Use the \l visible property for that.
+
\sa QAction::text, QWidget::windowTitle
*/
QAction * QDockWidget::toggleViewAction() const