From 296bae3f10549e3b1a066df6d61b93b8c650bd0f Mon Sep 17 00:00:00 2001 From: Dheerendra Purohit Date: Fri, 22 Nov 2024 18:55:30 +0530 Subject: [PATCH] Doc: QAction Object ownership in QDockWidget::toggleViewAction() QAction object returned by QDockWidget::toggleViewAction() is owned by the QDockWidget. QAction object is deleted when the QDockWidget is destroyed. Fixes: QTBUG-70171 Pick-to: 6.5 Change-Id: I279366209228c88241e3bf70c17c117a2bf91f40 Reviewed-by: Volker Hilsheimer (cherry picked from commit f5e127c842f4fad459d8abdfea8ae45025b6107f) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/widgets/qdockwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index f3535255535..73d69854d57 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -1730,6 +1730,9 @@ bool QDockWidget::event(QEvent *event) The action's text is set to the dock widget's window title. + The QAction object is owned by the QDockWidget. It will be automatically + deleted when the QDockWidget is destroyed. + \note The action can not be used to programmatically show or hide the dock widget. Use the \l visible property for that.