From c552fef134e7fcd5f89a6929f79c887a487fad25 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Mon, 19 Jun 2023 10:02:19 +0200 Subject: [PATCH] Added documentation for the queued _this->ensureWidgetVisible(TabWidget) call --- src/DockAreaTabBar.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DockAreaTabBar.cpp b/src/DockAreaTabBar.cpp index 898fc48..48e3c22 100644 --- a/src/DockAreaTabBar.cpp +++ b/src/DockAreaTabBar.cpp @@ -108,6 +108,9 @@ void DockAreaTabBarPrivate::updateTabs() { TabWidget->show(); TabWidget->setActiveTab(true); + // Sometimes the synchronous calculation of the rectangular area fails + // Therefore we use QTimer::singleShot here to execute the call + // within the event loop - see #520 QTimer::singleShot(0, [&, TabWidget]{ _this->ensureWidgetVisible(TabWidget); });