Update documentation of signal QDockWidget::visibilityChanged

The signal can deviate from QWidget::isVisible().

This patch clarifies the signal's documentation.
Since its name suggests that it is in sync with QWidget::isVisible(),
A TODO comment is added to consider deprication in Qt7.
It appears to be more reliable to listen to hide/show events.

Fixes: QTBUG-48161
Change-Id: I43aa16c2ecb4877abd8effb7da8e07576438d6d2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 7993321e7620941f3106acb977243c51aa27ceec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Axel Spoerl 2023-06-15 15:13:44 +02:00 committed by Qt Cherry-pick Bot
parent a84d0b6bab
commit bede24ee04
2 changed files with 5 additions and 1 deletions

View File

@ -1721,6 +1721,10 @@ QAction * QDockWidget::toggleViewAction() const
invisible). This happens when the widget is hidden or shown, as
well as when it is docked in a tabbed dock area and its tab
becomes selected or unselected.
\note The signal can differ from QWidget::isVisible(). This can be the case, if
a dock widget is minimized or tabified and associated to a non-selected or
inactive tab.
*/
/*!

View File

@ -72,7 +72,7 @@ Q_SIGNALS:
void featuresChanged(QDockWidget::DockWidgetFeatures features);
void topLevelChanged(bool topLevel);
void allowedAreasChanged(Qt::DockWidgetAreas allowedAreas);
void visibilityChanged(bool visible);
void visibilityChanged(bool visible); //TODO depricate in Qt7: Better listen to hide/show events
void dockLocationChanged(Qt::DockWidgetArea area);
protected: