From 883afddd1e81ab4b8f3d2a609719066e06719e2c Mon Sep 17 00:00:00 2001 From: Axel Spoerl Date: Mon, 12 May 2025 11:46:19 +0200 Subject: [PATCH] QDockWidgetGroupWindow: Copy window icons to tabs If a QDockWidget has a window icon, copy it to the respective tab of the group windows. [ChangeLog][Widgets][QDockWidget] When grouping dock widgets in tabs, the dock widgets' window icons are now used in the tab bar. Fixes: QTBUG-136624 Fixes: QTBUG-814 Change-Id: I59c393e864a7bd3e52e376778257aff0dc8aea4b Reviewed-by: Volker Hilsheimer --- src/widgets/widgets/qdockarealayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp index 98643eb7af2..7f3a7e70db3 100644 --- a/src/widgets/widgets/qdockarealayout.cpp +++ b/src/widgets/widgets/qdockarealayout.cpp @@ -2197,7 +2197,7 @@ bool QDockAreaLayoutInfo::updateTabBar() const QString title = dw->d_func()->fixedWindowTitle; quintptr id = tabId(item); if (tab_idx == tabBar->count()) { - tabBar->insertTab(tab_idx, title); + tabBar->insertTab(tab_idx, dw->windowIcon(), title); #if QT_CONFIG(tooltip) tabBar->setTabToolTip(tab_idx, title); #endif @@ -2207,7 +2207,7 @@ bool QDockAreaLayoutInfo::updateTabBar() const && qvariant_cast(tabBar->tabData(tab_idx + 1)) == id) tabBar->removeTab(tab_idx); else { - tabBar->insertTab(tab_idx, title); + tabBar->insertTab(tab_idx, dw->windowIcon(), title); #if QT_CONFIG(tooltip) tabBar->setTabToolTip(tab_idx, title); #endif